Json Player.Position.Percentage example help

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
NeoNator Offline
Junior Member
Posts: 9
Joined: Apr 2017
Reputation: 0
Post: #1
Has anyone got Player.Seek working with Player.Position.Percentage because i just want to restart the video from the start but cant find any example and am unable to modify the examples i can find to work (ie smallforward to percentage). I know this is possible from the wiki (http://kodi.wiki/view/JSON-RPC_API/v6#Player.Seek)

( {"jsonrpc":"2.0","method":"Player.Seek","params":{ "playerid":1,"value":"smallforward"},"id":1} )

This is what i have tried but i really dont know what im doing

{"jsonrpc": "2.0", "method": "Player.Seek", "params": { "playerid": 1, "value": " Player.Position.Percentage":0 }, "id": 1}
{"jsonrpc": "2.0", "method": "Player.Seek", "params": {"playerid":1,"value":{ "hours":0, "minutes":10, "seconds":0}, “id”:1}
{"jsonrpc": "2.0", "method": "Player.Seek", "params": {"properties": ["Player.Position.Percentage"]}, "id": 1}
{"jsonrpc": "2.0", "method": "Player.Seek", "params":{“playerid”:1,"percentage":0, “id”:1}

Any help would be great thanks Smile
find quote
axa88 Offline
Senior Member
Posts: 137
Joined: Mar 2015
Reputation: 5
Location: NY USA
Post: #2
I should probably stop giving advice from the John as i don't tend to recall things off the top of my head very accurately but
first make sure your video player id is actually 1, not sure if it should be or not but I've caught video playing from I'd 0or it was reporting wrong.

then try:
{"jsonrpc":"2.0", "method":"Player.Seek", "params": { "playerid":1, "value":0 }, "id":1}

for the second one try including all the properties like milliseconds.

the 3rd is just wrong, as is the 4th
(This post was last modified: 2017-05-22 06:16 by axa88.)
find quote
NeoNator Offline
Junior Member
Posts: 9
Joined: Apr 2017
Reputation: 0
Post: #3
Thanks!

{"jsonrpc":"2.0", "method":"Player.Seek", "params": { "playerid":1, "value":0 }, "id":1} Worked!! Big Grin

Yeah my player ID is 1, doesn't work otherwise... Tongue

Thanks a bunch!
find quote
ncarthy Offline
Member
Posts: 52
Joined: Aug 2010
Reputation: 0
Location: London
Post: #4
(2017-05-22 23:44)NeoNator Wrote:  Yeah my player ID is 1, doesn't work otherwise...

That's right. playerid is 0 for audio, 1 for video and 2 for picture slideshows.
find quote
axa88 Offline
Senior Member
Posts: 137
Joined: Mar 2015
Reputation: 5
Location: NY USA
Post: #5
(2017-05-23 11:51)ncarthy Wrote:  
(2017-05-22 23:44)NeoNator Wrote:  Yeah my player ID is 1, doesn't work otherwise...

That's right. playerid is 0 for audio, 1 for video and 2 for picture slideshows.

That's not right. executing player is determined on the type of media file that is playing regardless if it has video or not.

Take the AppleItunes Podcast audio addon, here's your player feedback

[
{
"playerid": 1,
"type": "audio"
}
]

and there are others...
(This post was last modified: 2017-06-12 16:21 by axa88.)
find quote