WifiRemote for MP2 (1 Viewer)

johanj

MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    42
    Sweden Sweden
    The 'nowplayingupdate' message seems to be correct but do you send the 'status' and 'nowplaying' message? The nowplaying is sent when media starts and one can also request for it. The nowplayingupdate is a much smaller message mainly for updating progress bar.

    Edit. Volume control works btw
    Edit2. The keyboard buttons works fine, so I could e.g. rename the client name using the iOS keyboard.
     
    Last edited:

    FreakyJ

    Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #13
    The 'nowplayingupdate' message seems to be correct but do you send the 'status' and 'nowplaying' message?
    I would say yes:
    Received message: {"Type":"nowplaying","MediaInfo":null,"Duration":0,"File":"","Position":0,"IsTv":false,"IsFullscreen":false}

    Received message: {"Type":"status","IsPlaying":true,"IsPaused":false,"IsPlayerOnTop":false,"Title":"Covert Affairs S01E01 - Pilot","CurrentModule":"Video/Image","SelectedItem":"","WindowId":"882c1142-8028-4112-a67d-370e6e483a33"}


    Received message: {"Type":"nowplayingupdate","Speed":1,"Duration":4815,"File":"Covert Affairs S01E01 - Pilot","Position":1,"IsTv":false,"IsFullscreen":true}


    Received message: {"Type":"nowplayingupdate","Speed":1,"Duration":4815,"File":"Covert Affairs S01E01 - Pilot","Position":2,"IsTv":false,"IsFullscreen":true}
    This is how it looks like in the DebugWindow from the DemoClient. I have no clue how it should look like^^
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,537
    7,038
    Germany Germany
    Country flag
    It will get funny once you send progress for 2 concurrent players :sneaky:
    ;)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,537
    7,038
    Germany Germany
    Country flag
    What is your opinion about the MPExtended and MP2 Thing?
    In principle MPExtended could act like a MP2-Client and query the MediaLibrary from server via UPnP interface. This way we could browse all items like we do in client.

    In this case MPExtended would need to get a "plugin" that does not query DB directly, but using the UPnP layer. I have no idea how MPExtended is implemented and if we could add such a plugin...
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    42
    Sweden Sweden
    I get the nowplaying message and also info. But I use the MediaInfo for checking the type of nowplaying screen to use in the app use that is null.

    data.MediaInfo.MediaType: can in MP1 be of the types:
    movie, video, series, music, radio, recording, tv

    I also check for
    if (data.File != undefined && data.File != "" && self.isPlaying) {
    for showing a nowplaying screen with 'unknown' mediatype but that is not either fullfilled in this case so no now playing screen is shown at all.

    I also use the fields:
    data.CurrentModule
    data.SelectedItem
    of the status message to show what is selected when navigating in the gui. This can be useful when not seeing the tv screen.

    But overall most messages seems to be there. It's more of filling in the missing fields.
     

    FreakyJ

    Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #18
    But I use the MediaInfo for checking the type of nowplaying screen to use in the app use that is null.
    The function was called to early, because the Messages from the Player are not fine enough. I create a workaround for that by moving it to the update Thread and check for NowPlaying.

    This is implemented for now, just for your information:
    Code:
    if (mediaItem.Aspects.ContainsKey(AudioAspect.ASPECT_ID))
                return new NowPlayingMusic(mediaItem);
              // TODO Add Radio
              // TODO Add Dvd
              if (mediaItem.Aspects.ContainsKey(MovieAspect.ASPECT_ID))
                return new NowPlayingMovingPictures(mediaItem);
    
              if (mediaItem.Aspects.ContainsKey(SeriesAspect.ASPECT_ID))
                return new NowPlayingSeries(mediaItem);
    
                if (mediaItem.Aspects.ContainsKey(VideoAspect.ASPECT_ID))
              return new NowPlayingVideo(mediaItem);
              // TODO: Add Tv
    I also use the fields:
    data.CurrentModule
    data.SelectedItem
    Could you give me some more information on these fields? I don't really know what They mean :)
    Does Module mean the Screen? E.g. Configuration?
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    42
    Sweden Sweden
    CurrentModule is e.g. Moving Pictures, Pictures, Tv etc
    Selected item is the item that is selected in the gui, e.g. a program in the epg or a movie name.

    Using the shortcuts to the plugins, navigating with arrow keys and looking at these two fields are most often enough for starting e.g. a movie or music without the tv on.
     

    FreakyJ

    Development Group
  • Team MediaPortal
  • July 25, 2010
    4,024
    1,420
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #20
    Selected item is the item that is selected in the gui, e.g. a program in the epg or a movie name.
    I don't know if this is possible with MP2, I just started to work with the GUI this week, but I will take a look into the CurrentModule tomorrow :)
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    toricred MP2 - V2.3 MP2 2.3 Client won't start General 6
    Grisu002 MP2 - V2.3 MP2 2.3 Client startet nicht - bleibt beim Laden hängen Allgemeines Support- und Diskussionsforum 25
    M MP2 PROBLEME Standby Allgemeines Support- und Diskussionsforum 1
    Scheibes Was passiert bei MP2? Allgemeines Support- und Diskussionsforum 42
    S Programmierte Aufnahme in MP2 - kein Aufwachen des PC Allgemeines Support- und Diskussionsforum 5
    morpheus_xx [Finished] "What's New" plugin for MP2 upgrades MediaPortal 2 20
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    morpheus_xx [Evaluate] Checking MP2 code portability to .Net Core MediaPortal 2 11
    da3dsoul Does MP2 not have any active devs? General 8
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    R [solved] Kein Player registriert Allgemeines Support- und Diskussionsforum 1
    -Merkur- MP2 Client startet nicht, "libXBMC_addon.dll" fehlt Allgemeines Support- und Diskussionsforum 1
    mp2-ulrich [solved] MP 2.2.3 spielt nur manche Sender Allgemeines Support- und Diskussionsforum 2
    H MP2 database won't keep in synch with recordings General 8
    H [solved] MP2 Wiedergabe von Aufnahmen und Live TV geht nicht Allgemeines Support- und Diskussionsforum 6
    ge2301 [WiP] MP2Web - A platform independent web client for MP2 MediaPortal 2 72
    F Problems with new install of MP2 Newcomers Forum 3
    catalpa Bug MP2-837 Allgemeines Support- und Diskussionsforum 2
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    bigboss97 Does anyone has a SoundGraph imon remote file for MP2 to share? General 0
    ge2301 Android based client for MP2 MediaPortal 2 3
    R MP2 GUI Issues General 7
    P [solved] MP2 new install, 2 x hdhomerun tuners, client on same PC unable to view TV & recordings Newcomers Forum 8
    Lichloathe MP2 importing keyart instead of poster General 0

    Similar threads

    Top Bottom