Mediasite Plugin For MediaPortal (1 Viewer)

Vic Demented

Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    After speaking with Morpheus, he suggested that I post this here. I am currently working on building a plugin for MP2 that is capable of displaying university course content streamed from a Mediasite server, and while I am quite familiar with the Mediasite API, I am very green when it comes to XAML so I am reaching out to the MP community to see who is interested in teaming up to help build this plugin.

    Background Info:
    Mediasite streams lectures that constist of videos (H.264 MP4) and slides (jpg) (some lectures may have just one either or both) that are synced with the video. My goal is to build a full featured plugin that enables the user to search, browse, and play this content in a more visually pleasing way.

    Here's a link to a sample Catalog:
    http://mediasite.video.ufl.edu/Medi...e754021/?state=olHQL8W7F8Cu0TfhJmeO&_suid=997

    Here's a link to a sample of what type of content is produced by Mediasite :
    http://mediasite.video.ufl.edu/Medi...?catalog=58a2c26a-048c-42de-8950-c7f68c1e7540

    I was thinking a modified version of OnlineVideos might work. I could return a list of folders and when you select the folder then I can display a list of presentations that include a preview image, all the metadata, urls etc. Then they could click the presentation to play and the player would have two windows. One larger window for the slide content and a smaller window for the video. It would be cool if we could let the user swap them like the sample above. We would also need a settings screen so that we could store the username & password and URL for the mediasite API.

    The GitHub repository is located here: https://github.com/VicDemented/MediaPortal-2
    The plugin thus far has made some real good progress in a short amount of time. I was able to get a dev server setup with the kind folks at Sonic Foundry so that we could have a real environment to test against.



    Thanks to Morpheus and his hard work, the UI is coming along nicely. Currently, the user browses for the presentation they want to watch via a list and once the video begins to stream the video plays on the left and the slides will be displayed on the right. The slides are synced with the video and if the user clicks on one of the slides in the thumbnail filmstrip it will jump the player to the point in the video where that slide is shown.
     
    Last edited:

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Nice idea!

    I think the GUI can be created without major problems, we have everything we will need:
    • Big image for current slide (regular image with URL source)
    • List of small slide-thumbnails, will be scrollable
    • Video player plays the video stream
      • If slide has a video timecode associated we could seek to this position, but:
      • Seeking webstreams might not be possible (depending in stream protocol and source filter)
    Most things we will deal with are ListItems, ListViews/WrapPanels and regular Images with URL sources and a VideoPlayer to play streams.

    Do you have already some source codes available?
     

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    I have some code, if you want to setup the SVN/Git, repository I can upload a starter solution that I am working on.
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    I have some code, if you want to setup the SVN/Git, repository I can upload a starter solution that I am working on.
    I would suggest you create an account at http://github.com , if not done already.
    After that you can fork the MP2 repository: https://github.com/MediaPortal/MediaPortal-2
    You will be able to even give others, i.e. morpheus access to this repository.

    I've doing it similar for things WIP or experimental branches etc https://github.com/chefkoch/MediaPortal-2/
     
    Last edited:

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    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:
    //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;
    	}
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Next step should be following:
    Then I can step into skin creation. And I think I will make some comments on coding style and conventions ;)
     

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    Sorry for the delay but I've been out of town for the past week. Anyway, I think I did it right. I checked out the dev branch and then created FEAT_Mediasite and added the project. Comitted and pushed.
     

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    49
    Brugge, Belgium
    United States of America United States of America
    Whoops...forgot to add it to the client solution..I'll do that now.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Just checked out your branch. First things todo:
    1. Set your plugin as target "x86", remove "Mixed Platform" and "AnyCPU" from project solution. All MP2 projects are targeted at x86.
    2. When I tried to run MP2-Client with your plugin included, it fails due to duplicated resource registration (result of copy HelloWorldSkin)
      System.ArgumentException: At location '/Resources/Skin', a plugin item with id 'HelloWorldSkin' is already registered
      bei MediaPortal.Common.PluginManager.PluginRuntime.RegisterItem(PluginItemMetadata itemMetadata) in D:\Coding\MP\MP2\MP2_git\MediaPortal-2-VicDemented\MediaPortal\Source\Core\MediaPortal.Common\PluginManager\PluginRuntime.cs:Zeile 595.
      bei MediaPortal.Common.PluginManager.PluginRuntime.RegisterItems() in D:\Coding\MP\MP2\MP2_git\MediaPortal-2-VicDemented\MediaPortal\Source\Core\MediaPortal.Common\PluginManager\PluginRuntime.cs:Zeile 331.
      bei MediaPortal.Common.Services.PluginManager.PluginManager.TryEnable(PluginRuntime plugin, ICollection`1 autoActivatePlugins) in D:\Coding\MP\MP2\MP2_git\MediaPortal-2-VicDemented\MediaPortal\Source\Core\MediaPortal.Common\Services\PluginManager\PluginManager.cs:Zeile 839.
      This needs to be changed inside plugin.xml
    I could change it myself, but better you do it
     
    Last edited:

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom