Introduced in NextPVR v2.3.6, the 'touch' web service is an experimental feature to allow 'remoting' of the NextPVR user interface using a standard HTTP connection.
This page is to explain a little about how it works and is aimed mainly at those who want to create their own clients for smartphones, tablets and other remote devices.
Using the service
Access to the service is through NextPVR's built-in web service using a URL in the following format...
The relevant files are found in the NextPVR 'data' folder under \web\touch
How it works
The 'touch' client is served by an instance of NextPVR.exe in the same way as MVPs / NMTs are served. The key part is an HTML <img /> element which is updated at each key-press, mouse-click or touch-screen action. The first image is retrieved in client.html as follows...
The service uses a jQuery plugin called WipeTouch. The NextPVR \web\touch distribution includes a version which I modified to provide customisable click / double-click functionality (nextpvr.wipetouch-1.1.0-mod.js).
To change the click / double-click parameters, modify the nextpvr.touch.wipetouch.js plugin with the parameters used to initialise the WipeTouch plugin (values in milliseconds)...
Playing media and watching Live TV
These will also need to be appended to the server/port URL and passed to a media player. The 'transcode' is for Live TV and 'stream' is for Music, Recordings and Videos.
Each of these platform specific files should implement the same functions (even if they do nothing).
At the time of the release of NextPVR v2.3.6, files are included for 'generic' and 'android' platforms.
In order to support other platforms, the current mechanism is to examine the User-agent part of the first HTTP request to try to identify a unique string.
The 'generic' version should work with standard PC browsers for demonstration purposes although streaming and Live TV will NOT work.
For an Android app to use for testing, search the Android Market for ntouch nextpvr. Please note it is experimental and provided for demo purposes only. To play audio/video you will need suitable 3rd party apps installed on your device. I'll be providing source code as an example for any other Android developers to use freely ASAP.
As the clients may be 'small screen', there is an option in the NextPVR config.xml file to provide a separate skin to allow customising the UI.
I've made a copy of the default skin with a few modifications for small screens. Download:Touch.zip
Page last modified on October 09, 2016, at 05:50 PM