home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Mediasite Plugin For MediaPortal
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Vic Demented" data-source="post: 973800" data-attributes="member: 137971"><p>Included in the solution is a MediasitePlugin project. I've included the WCF proxy class and a reference to : MediasiteAPIConnector </p><p></p><p>This assembly takes in the URL to a Mediasite WCF service (along with a public/private key) and returns a RequestTicket which must be included with every API request. Here's an example that's included in the new project:</p><p> </p><p>[CODE=C#]//Returns a list of presentations (lectures) between 01/01/00 & the present</p><p> </p><p>public ItemsList loadPresentations()</p><p> {</p><p> var _pRequest = new QueryPresentationsByCriteriaRequest(){ Ticket = _RequestTicket, ApplicationName = "MediaPortal2", QueryCriteria = new PresentationQueryCriteria(){ StartDate = Convert.ToDateTime("01/01/00"), EndDate = System.DateTime.Now, PermissionMask = ResourcePermissionMask.Read}, Options= new QueryOptions(){ BatchSize = 100, StartIndex = 0}};</p><p> var _tpresentations = _Client.QueryPresentationsByCriteria(_pRequest);</p><p> var list = new ItemsList();</p><p> for (int i = 0; i < _tpresentations.Presentations.Length; i++)</p><p> {</p><p> ListItem _item = new ListItem("Name", _tpresentations.Presentations[i].Name);</p><p> _item.SetLabel("ID", _tpresentations.Presentations[i].Id);</p><p> _item.SetLabel("URL", _tpresentations.Presentations[i].VideoUrl + "?AuthTicket=" + CreateAuthTicket(_tpresentations.Presentations[i].Id));</p><p> list.Add(_item);</p><p> }</p><p> return list;</p><p> }</p><p> </p><p>//Creates an authenticated ticket to be appended to the VideoURL so that it can be streamed without a username/password</p><p>public string CreateAuthTicket(string MediasiteResourceID)</p><p> {</p><p> var _aRequest = new CreateAuthTicketRequest(){ ApplicationName = _Application, Ticket = _RequestTicket, TicketSettings = new CreateAuthTicketSettings(){ Username = "MediaPortalUser", ResourceId = MediasiteResourceID, MinutesToLive = 10}};</p><p> return _Client.CreateAuthTicket(_aRequest).AuthTicketId;</p><p> }</p><p>[/code]</p></blockquote><p></p>
[QUOTE="Vic Demented, post: 973800, member: 137971"] Included in the solution is a MediasitePlugin project. I've included the WCF proxy class and a reference to : MediasiteAPIConnector This assembly takes in the URL to a Mediasite WCF service (along with a public/private key) and returns a RequestTicket which must be included with every API request. Here's an example that's included in the new project: [CODE=C#]//Returns a list of presentations (lectures) between 01/01/00 & the present public ItemsList loadPresentations() { var _pRequest = new QueryPresentationsByCriteriaRequest(){ Ticket = _RequestTicket, ApplicationName = "MediaPortal2", QueryCriteria = new PresentationQueryCriteria(){ StartDate = Convert.ToDateTime("01/01/00"), EndDate = System.DateTime.Now, PermissionMask = ResourcePermissionMask.Read}, Options= new QueryOptions(){ BatchSize = 100, StartIndex = 0}}; var _tpresentations = _Client.QueryPresentationsByCriteria(_pRequest); var list = new ItemsList(); for (int i = 0; i < _tpresentations.Presentations.Length; i++) { ListItem _item = new ListItem("Name", _tpresentations.Presentations[i].Name); _item.SetLabel("ID", _tpresentations.Presentations[i].Id); _item.SetLabel("URL", _tpresentations.Presentations[i].VideoUrl + "?AuthTicket=" + CreateAuthTicket(_tpresentations.Presentations[i].Id)); list.Add(_item); } return list; } //Creates an authenticated ticket to be appended to the VideoURL so that it can be streamed without a username/password public string CreateAuthTicket(string MediasiteResourceID) { var _aRequest = new CreateAuthTicketRequest(){ ApplicationName = _Application, Ticket = _RequestTicket, TicketSettings = new CreateAuthTicketSettings(){ Username = "MediaPortalUser", ResourceId = MediasiteResourceID, MinutesToLive = 10}}; return _Client.CreateAuthTicket(_aRequest).AuthTicketId; } [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Mediasite Plugin For MediaPortal
Contact us
RSS
Top
Bottom