"Play with" feature in JSON RPC API
#31
Can't -1 just stop all active players to force the normal player logic in XBMC core and not have to duplicate it ?
Reply
#32
The problem with stopping all active players is that it might not be what the user wants. If he's playing a song over UPnP while looking at a slideshow it would probably be very unexpected that a Player.Open to play a new song locally would stop the slideshow. I'll look into it tonight to see if there's an easy way around the problem by setting the "force specific player" to "none" instead of leaving it with whatever value was set last.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#33
Any news on this or does the feature freeze kick this out for sure for Helix ?
Reply
#34
I'm on vacation so can't look into it until October.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#35
Montellese is currently on holiday /busy iirc. Indeed feature freeze means no new features. Unless the team decides this can be considered a bug
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#36
No problem enjoy them Smile Was just wondering as I saw the feature freeze when back from my vacations Wink
Reply
#37
Please give PR5454 a try and let me know if it helps.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#38
Thanks a lot, will test this tomorrow night.
Reply
#39
Sorry not enough time Sad Will finish tests tomorrow
Reply
#40
Finally tested earlier since had to test other things Smile

So the patch does work. As expected when using play with in XBMC next starts from JSON will continue on target UPnP player.

Adding "options":{"playercoreid" :"default"} will most of the time stop the UPnP rendering and start the media locally as expected.

Questions are now :
How should things works ?

85% of the time UPnP renderer stops and media start locally, but 15% both plays. (Same with GUI) I could even reproduce it some times when using Play with to my TV with some unsupported media they then started locally without stopping on TV.

Another strange detail but when in GUI file mode, I chose Play with on file named toto.mp4 of 7 min duration to my TV, then the mini controller shows another file name from the same directory but with correct lenght and not the one of the other media Sad

And second since I never took time to really test, but when playing on remote UPnP :

Player.GetActivePlayers returns [] meaning no active players.

So it seems remotes have no way to know if something is playing and for example to stop it unless using Event Server stop remote code.

And third. When having XBMC targeting my TV with something playing, using Player.Open without any playercoreid try to start the media on the TV but if the media is not supported the start fails but JSON returns me a OK message.
So linked with previous no active players I have no way to know if media starts or not.

All this with XBMC compiled clean today at rev : abcb3122f55f7737b612045f7754bfc2a3897720 with only your patch applied
Reply
#41
(2014-10-07, 19:58)Tolriq Wrote: Finally tested earlier since had to test other things Smile

So the patch does work. As expected when using play with in XBMC next starts from JSON will continue on target UPnP player.

Adding "options":{"playercoreid" :"default"} will most of the time stop the UPnP rendering and start the media locally as expected.
Thanks for taking the time to do extensive tests.

(2014-10-07, 19:58)Tolriq Wrote: 85% of the time UPnP renderer stops and media start locally, but 15% both plays. (Same with GUI) I could even reproduce it some times when using Play with to my TV with some unsupported media they then started locally without stopping on TV.
Hm I only tried 15 to 20 times and it always worked. This sounds more like an issue in the UPnP controller than with JSON-RPC. Especially the error handling which results in automatic local playback is IMO a bit questional in general.

(2014-10-07, 19:58)Tolriq Wrote: Another strange detail but when in GUI file mode, I chose Play with on file named toto.mp4 of 7 min duration to my TV, then the mini controller shows another file name from the same directory but with correct lenght and not the one of the other media Sad
This is unrelated to JSON-RPC right? You tried to play a file from XBMC GUI and it didn't behave as expected?

(2014-10-07, 19:58)Tolriq Wrote: And second since I never took time to really test, but when playing on remote UPnP :

Player.GetActivePlayers returns [] meaning no active players.

So it seems remotes have no way to know if something is playing and for example to stop it unless using Event Server stop remote code.
I'll try to look into this. Looks like this problem also existed before the Player.Open addition.

(2014-10-07, 19:58)Tolriq Wrote: And third. When having XBMC targeting my TV with something playing, using Player.Open without any playercoreid try to start the media on the TV but if the media is not supported the start fails but JSON returns me a OK message.
So linked with previous no active players I have no way to know if media starts or not.
Yeah the problem is that playback is started asynchronously to the request so all the "OK" response means is that JSON-RPC was able to find the item you would like to play and has passed it on to the playback logic. This also happens when you try to play a file that exists but is not supported by DVDPlayer or PAPlayer.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#42
(2014-10-08, 09:49)Montellese Wrote:
(2014-10-07, 19:58)Tolriq Wrote: 85% of the time UPnP renderer stops and media start locally, but 15% both plays. (Same with GUI) I could even reproduce it some times when using Play with to my TV with some unsupported media they then started locally without stopping on TV.
Hm I only tried 15 to 20 times and it always worked. This sounds more like an issue in the UPnP controller than with JSON-RPC. Especially the error handling which results in automatic local playback is IMO a bit questional in general.

(2014-10-07, 19:58)Tolriq Wrote: Another strange detail but when in GUI file mode, I chose Play with on file named toto.mp4 of 7 min duration to my TV, then the mini controller shows another file name from the same directory but with correct lenght and not the one of the other media Sad
This is unrelated to JSON-RPC right? You tried to play a file from XBMC GUI and it didn't behave as expected?

Yes both are not really JSON related but since you worked a lot on UPnP in XBMC I report those findings during the tests to you also Smile

The second problem is a pure display problem, and I'll try to test today if using playercoreid from JSON the problem is also present.
This is not a big problem for now since remotes have no access to mini upnp controller, but if you fix it then JSON have chance to get wrong values too.
Reply
#43
I took another look and integrating remote players into Player.GetActivePlayers will not be as easy as I thought. The problem is that the player logic inside XBMC that controls the remote player reports that it neither plays video nor audio. This information is wrong when we consider that it's playing something on the remote device but it is correct when we look at what is happening on the machine XBMC is running on. The problem is that all the rest of the XBMC code assumes that this information represents the state of the machine XBMC is running on so there's a lot of code that checks these properties/flags and takes different actions that are relevante for what is displayed in a skin etc. So just changing these properties/flags won't work.

I'll have to discuss this with the player devs to see what the best solution is.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#44
Has this issue ever been solved? I tried to control a UPNP renderer from Kodi over json-rpc and found two issues:

1. Player.GetActivePlayers doesn't return the UPNP player
2. Player.PlayPause just works for pausing but not resuming (using playerid=0)

Other Player. commands seem to work with playerid=0 if UPNP is the only active player (no matter if playing or paused).

Maybe it would be easier to write an add-on for this special purpose. Can you give some explanation or tips?
Reply

Logout Mark Read Team Forum Stats Members Help
"Play with" feature in JSON RPC API0