(2014-07-31, 23:30)Montellese Wrote: See PR5122.
This looks like a great new feature for Helix. I just tried out the new "Play with" feature using json-rpc and wanted to give some feedback / bugs
The following happens when I use "Play with" to start playback on a different xbmc instance over upnp (using the xbmc gui):
- Playback is started over upnp on the other host
- XBMC will displays the currently playing file and duration and cannot be used for local playback while using "Play with". Play / Pause can be used to control playback. Seeking did not work, next / previous will play the next item over upnp.
- If I tried to control the upnp renderer from an upnp application it was not able to play the next item in a playlist (probably not implemented on xbmc).
Now to the json-rpc related stuff
- Returning the list of players works fine
- Playing a movie / episode etc using Player.Open and specifying the playercoreid also works and the file is played on the other machine.
- When I use Player.Open together with playlistid / position it does not start playback using the requested player
Code:
curl -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"method\":\"Player.Open\",\"params\":{\"item\":{\"playlistid\":0,\"position\":1},\"options\":{\"playercoreid\":5}},\"id\":1}" http://127.0.0.1:8080/jsonrpc
Looking at the code It seems to ignore the playercoreid because it jumps into an "if block" on line 524 of PlayerOperations.cpp, function open.. and therefore does not execute the logic to change the player. Any special reason for not including this?
- When playing a file over upnp, xbmc displays the currently playing item on the screen. Requesting the active players or the current item over json rpc doesn't return anything. Would be nice if this data could be made available over json-rpc. Note: Notifications for start / stop are sent over port 9090 when playing a file over upnp.
Remark: If a file is playing using "Play with" and you try to play another file it will also automatically be played over upnp as long as you did not stop playback / reach the end of the queue which then probably resets the player. ( I think it will play as long as g_application.m_eForcedNextPlayer is not reset to the local player). => Using Player.Open without specifying the playercoreid may still play the next item over upnp. But I think this is ok, since xbmc behaves the same way when you select an item for playback.