Bug Player.OnPlay returns wrong playerid
#1
Hi,

when starting a video addon using Player.Open (specifying plugin://<addon-id>... as the corresponding file), a Player.OnPlay event is sent back via the web socket connection. So far so good. Unfortunately, this event specifies 0 as params.data.player.playerid instead of 1 (it's a video!) But requesting Player.GetItem with playerid = 0 then results in an error-object while Player.GetItem with playerid = 1 succeeds. (Gotham, Final Release)

Thanks in advance
Dieter
Reply
#2
Hm I just gave this a try with the following video from the youtube plugin
Code:
plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=o89zNUoN-b0
and it works fine.

Can you provide an example plugin and plugin-URL which doesn't work for you?
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
#3
sorry for the delay. I haven't read this forum for a while.

An example is from the ESA web side "Where is it":
Object { file: "plugin://plugin.video.esa/?action=play_video&url=http%3A%2F%2Fwww.esa.int%2Fspaceinvideos%2FVideos%2F2014%2F06%2FWhere_is_it" }

Then json returns a Player.OnPlay object with data.item.type "movie" but
data.player.playerid 0.

Image
Reply
#4
Sorry for the late response. I've given this another try with a video from the ESA plugin (as your URL doesn't work anymore) and I still get "playerid" as 1 as expected.
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
#5
Hi there, I am reading this post because I am having exact;y the same problem. Especially on Kodi.

Sending this:

Code:
{"jsonrpc":"2.0","id":5,"method":"Player.Open","params":{"item": {"file": "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=gPkMx_pfJ5w"}}}

Would result with this notification:

Code:
{"jsonrpc":"2.0","method":"Player.OnPlay","params":{"data":{"item":{"title":"Pan's Labyrinth   Official Trailer HD 720p","type":"movie","year":2012},"player":{"playerid":0,"speed":1}},"sender":"xbmc"}}

(player id is 0)
Reply
#6
posted
http://forum.kodi.tv/showthread.php?tid=238591
reported
http://trac.kodi.tv/ticket/16262

basically it's possible to get conflicting player Id feedback.
Reply
#7
IMO this would require a big change / fix.

https://github.com/xbmc/xbmc/blob/350a8e....cpp#L4289

The problem is that Kodi now support mixed playlists and so the player can change between queue and real start.
Reply
#8
Could you define "queue"?

My observations was a change between player notification of play and a follow up properties query of the same player.
If your description is accurate, I would question why an OnPlay notification, assumed from the player itself, would be sent before what ever a 'real start' is.
Reply
#9
The message was more toward Montellese Wink

He will understand the linked code and it's implications.

And your question is the good one, it have others impact like seek position not accurate in some cases Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Player.OnPlay returns wrong playerid0