WifiRemote for MP2 (1 Viewer)

johanj

MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    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

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    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

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    It will get funny once you send progress for 2 concurrent players :sneaky:
    ;)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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
    46
    Home Country
    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

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    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
    46
    Home Country
    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

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    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

    Top Bottom