Mediasite Plugin For MediaPortal

Discussion in 'Plugin Development' started by Vic Demented, March 11, 2013.

  1. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    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.

    [​IMG]



    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: April 2, 2013
    • Like Like x 6
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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?
     
  4. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    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.
     
  5. chefkoch
    • Premium Supporter

    chefkoch Retired Team Member

    Joined:
    October 5, 2004
    Messages:
    3,130
    Likes Received:
    1,456
    Gender:
    Male
    Location:
    Dresden / Munich / Maastricht
    Ratings:
    +1,773 / 1
    Home Country:
    Germany Germany
    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: March 11, 2013
  6. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
  7. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    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 (C):
    1. //Returns a list of presentations (lectures) between 01/01/00 & the present
    2.  
    3. public ItemsList loadPresentations()
    4.     {
    5.         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}};
    6.         var _tpresentations = _Client.QueryPresentationsByCriteria(_pRequest);
    7.         var list = new ItemsList();
    8.         for (int i = 0; i < _tpresentations.Presentations.Length; i++)
    9.         {
    10.             ListItem _item = new ListItem("Name", _tpresentations.Presentations[i].Name);
    11.             _item.SetLabel("ID", _tpresentations.Presentations[i].Id);
    12.             _item.SetLabel("URL", _tpresentations.Presentations[i].VideoUrl + "?AuthTicket=" + CreateAuthTicket(_tpresentations.Presentations[i].Id));
    13.             list.Add(_item);
    14.         }
    15.         return list;
    16.     }
    17.  
    18. //Creates an authenticated ticket to be appended to the VideoURL so that it can be streamed without a username/password
    19. public string CreateAuthTicket(string MediasiteResourceID)
    20.     {
    21.         var _aRequest = new CreateAuthTicketRequest(){ ApplicationName = _Application, Ticket = _RequestTicket, TicketSettings = new CreateAuthTicketSettings(){ Username = "MediaPortalUser", ResourceId = MediasiteResourceID, MinutesToLive = 10}};
    22.         return _Client.CreateAuthTicket(_aRequest).AuthTicketId;
    23.     }
    24.  
     
    • Like Like x 1
  8. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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 ;)
     
  9. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    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.
     
    • Like Like x 1
  10. Vic Demented
    • Premium Supporter

    Vic Demented Retired Team Member

    Joined:
    March 4, 2013
    Messages:
    42
    Likes Received:
    25
    Gender:
    Male
    Location:
    Brugge, Belgium
    Ratings:
    +25 / 0
    Home Country:
    United States of America United States of America
    Whoops...forgot to add it to the client solution..I'll do that now.
     
  11. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,750
    Ratings:
    +6,796 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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)
      This needs to be changed inside plugin.xml
    I could change it myself, but better you do it
     
    Last edited: March 15, 2013
    • Like Like x 2
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!