2016-05-13, 08:14
Hi,
I'm trying to write a simple video addon.
This addon has a Player script that implements onPlayerEnded and onPlayerStopped.
Now I want to know when the user stopped the video - i.e. how far in the video did this happen.
I saw there are getTime and getTotalTime methods for Player but when I call them from onPlayerStopped I get an error saying "XBMC is not playing any media file".
I also saw that there is an RPC method called 'Player.Position.Percentage' but I didn't manage to call it and I find it a bit odd that this basic operation sould be available only as RPC call.
Is there any other method I should use for after the video has been stopped? Should I override the stop method for that?
Thanks,
Ofir
I'm trying to write a simple video addon.
This addon has a Player script that implements onPlayerEnded and onPlayerStopped.
Now I want to know when the user stopped the video - i.e. how far in the video did this happen.
I saw there are getTime and getTotalTime methods for Player but when I call them from onPlayerStopped I get an error saying "XBMC is not playing any media file".
I also saw that there is an RPC method called 'Player.Position.Percentage' but I didn't manage to call it and I find it a bit odd that this basic operation sould be available only as RPC call.
Is there any other method I should use for after the video has been stopped? Should I override the stop method for that?
Thanks,
Ofir