Android Using Player.Seek in JSON-RPC
#1
I'm using JSON-RPC in my android app to control an XBMC device, the problem I'm facing is related to the function Player.Seek, regarding to the documentation I have to send the command as following:

Code:
{"id":"some_id","jsonrpc":"2.0","method":"Player.Seek","params":{"value":"smallforward","playerid":0}}

The problem is the value seeked is not constant for the same category, like in songs it seeking sometimes 10 sec and sometimes 20, and in movies sometimes 30 sec and sometimes 60, which makes me can't define global standardization for my work, can anyone help me with that?!! thanks in advance.
Reply
#2
how about implementing a function to first call Player.GetProperties to get the current/total time, then using Player.Seek to jump to a specif calculated time.
I mean if your looking to seek a few seconds the extra query might seem laggy.
but if your looking to jumping 30 seconds or a minute, then what's the real impact anyway.

for example you get current time, add global value, and then seek that position.
I would recommend checking bounds with total time if possible.
Reply
#3
This will get you to a fixed position:
Code:
{"jsonrpc":"2.0", "method":"Player.Seek", "params": { "playerid":1, "value":{ "seconds": 30 } }, "id":1}
Reply

Logout Mark Read Team Forum Stats Members Help
Using Player.Seek in JSON-RPC0