2015-04-27, 19:41
I recently created a small webpage that communicates with kodi using JSON-RPC. It's just a simple remote control with arrow keys, play/pause, fast-forward, rewind etc. I made it because existing web interfaces do not get along sorry about that is that very well with my dictation software Dragon NaturallySpeaking which I use because of my disability. My custom webpage is working well but I'm surprised that it works differently than keyboard commands. Here are just a few of the things I've noticed…
1. During playback, pressing left arrow or right arrow on the keyboard makes the video jump backwards or forwards 30 seconds. This is really handy skipping commercials when playing back PVR recordings. However when using arrow keys via JSON-RPC it doesn't work.
2. During playback pressing the key "i" for "info" brings up the OSD. One of the things visible in the OSD is the time at which the current program will conclude. However calling up the OSD using JSON-RPC does not include this feature.
There may be other inconsistencies that I haven't discovered yet. I suppose what I would really like is the ability to send keystrokes using JSON-RPC rather than having to use web sockets. The JSON method is much easier to implement in plain-vanilla JavaScript and HTML. Web sockets are a little bit beyond my skill level.
1. During playback, pressing left arrow or right arrow on the keyboard makes the video jump backwards or forwards 30 seconds. This is really handy skipping commercials when playing back PVR recordings. However when using arrow keys via JSON-RPC it doesn't work.
2. During playback pressing the key "i" for "info" brings up the OSD. One of the things visible in the OSD is the time at which the current program will conclude. However calling up the OSD using JSON-RPC does not include this feature.
There may be other inconsistencies that I haven't discovered yet. I suppose what I would really like is the ability to send keystrokes using JSON-RPC rather than having to use web sockets. The JSON method is much easier to implement in plain-vanilla JavaScript and HTML. Web sockets are a little bit beyond my skill level.