NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Time to make Touch web Service less experimental

 
  • 0 Vote(s) - 0 Average
Time to make Touch web Service less experimental
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#1
2013-09-15, 11:12 AM
In the last couple of days I've been tinkering with an experimental feature of NextPVR called Touch web Service.
Wiki - http://www.nextpvr.com/nwiki/pmwiki.php?...WebService

Thanks Sub!
This is such a good idea and platform for building lightweight, yet fully spec clients.
I'm using it to get NextPVR directly on my LG Smart TV as an App.
I think this platform has the potential to become a worthy successor to the excellent NMT-client now as PopcornHours are getting hard to find.

The big advantage to this approach vs building a client using traditional web services is that you'll get all the skinning, most features, including some 3rd party plugins for free. How is that possible?
Well..it basically works by running a real NextPVR client on the server and sending a screenshot image to the client whenever it receives a kepress sent over http. It can't be any simpler really.

I actually in less than a day of coding got it up an running on my LG TV looking and working just like the real thing. Me and web design don't mix very well so just getting the TV guide on the screen would have taken me weeks building a traditional web client depending on webservices.

This is early days but I feel confident to say this definitely is worth building on and it's time to move away from experimental.

I've listed some things that I feel would need fixing before it can drop it's experimental status.
Some things will need work to be made on server side, some issues may just be a matter of information.

Requested features
* Allow for multiple simultaneous clients
* The ability to send ctrl-keys (such as ctrl-P for play)
* More info about the file about to play (recording name, and resume at position etc)
* Streaming of files with accented filenames doesn't work.

Bugs and quirks due to it's experimental
* It starts playback of the requested file in the NextPVR.exe running (hidden) on the server causing errors.
* Server must be run using NRecord RUN to avoid the errors caused by this playback issue.


Just a thought...
I don't know anything about the inner workings of NextPVR but what comes to my mind is to refactor the NMT-mode to allow for communication using Motion Jpeg and http requests mimicking the “modified version of VNC” I believe is what NMT uses.
To me these two clients seem to have much i common.

/Fred
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,304
Threads: 864
Joined: May 2006
#2
2013-09-15, 12:55 PM
Yeah the fact that it needs NRecord RUN would need to be addressed if it moved out of experimental mode.

There is another http method where you can transfer keys and get full NextPVR screen captures send and just display them if you don't want to worry about screen design.

Martin
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#3
2013-09-15, 01:57 PM
mvallevand Wrote:There is another http method where you can transfer keys and get full NextPVR screen captures send and just display them if you don't want to worry about screen design.

Martin

Alright, interesting!
Would it be possible to connect to an idle instance of those NextPVRs reserved for NMT and use the http calls you mentioned?

Where can I find information about this http method?

/Fred
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,304
Threads: 864
Joined: May 2006
#4
2013-09-15, 05:16 PM (This post was last modified: 2013-09-15, 06:18 PM by mvallevand.)
It's documented in nextpvr.touch.common.js as the /control pages and it is basically like the NMT interface with an instance of NextPVR. I don't think it passes back files URL to files in /activity which was my biggest problem to the experiment.

Martin
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#5
2013-09-15, 06:25 PM (This post was last modified: 2013-09-15, 09:00 PM by fred250.)
mvallevand Wrote:There is another http method where you can transfer keys and get full NextPVR screen captures send and just display them if you don't want to worry about screen design.

Martin

mvallevand Wrote:It's documented in nextpvr.touch.common.js as the /control pages and it is basically like the NMT interface with an instance of NextPVR. I don't think it passes back files URL to files which was my biggest problem to the experiment.

Martin



OK, thought you meant something else but the Touch Web, hence the excitement.
When experimenting I just enhanced what was already there so I'm aware of the /control method. But I didn't see any documentation on how to send, let say, ctrl-P in one go.
The call looks like /control?time=' + new Date().getTime() + '&key=' + keyCode; where keycode is an ascii value. Maybe “&key=17+80” would do the trick?

You get URLs alright. They play nicely using /stream as long as they don't contain any accented filenames.

The Touch Web Service is quite usable as is but has a few showstoppers, like the non optional NRecord RUN and failing on streaming accented filenames.

Sub indicated he might consider enhancing the Touch Web Service if someone started using it.
It would be a shame not to since the idea is really terrific.

/Fred
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#6
2013-09-15, 06:47 PM
Quote:I don't know anything about the inner workings of NextPVR but what comes to my mind is to refactor the NMT-mode to allow for communication using Motion Jpeg and http requests mimicking the “modified version of VNC” I believe is what NMT uses.
To be honest, the NMT interface is really complicated, and pretty fragile, so not really worth changing anything in on that front.

I can look into enhancements on this touch stuff though, like running without 'NRecord RUN' and multiple instances. I'll have to take a look to remind myself how it works Big Grin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#7
2013-09-15, 06:51 PM
fred250 Wrote:OK, thought you meant something else but the Touch Web, hence the excitement.
When experimenting I just enhanced what was already there so I'm aware of the /control method. But I didn't see any documentation on how to send, let say, ctrl-P in one go.
The call looks like /control?time=' + new Date().getTime() + '&key=' + keyCode; where keycode is an ascii value. Maybe “&key=17+80” would do the trick?
From memory, the Control modifier is 0x20000. The Alt modifier is 0x40000. "Or" those with the keycode for "P"
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#8
2013-09-15, 07:43 PM (This post was last modified: 2013-09-15, 07:48 PM by fred250.)
Thanks Sub, Good news!

sub Wrote:I can look into enhancements on this touch stuff though, like running without 'NRecord RUN' and multiple instances. I'll have to take a look to remind myself how it works Big Grin

Let me know when there is something to test. Smile
I'm happy to help in case you need some more input in what enhancements to make.


sub Wrote:To be honest, the NMT interface is really complicated, and pretty fragile, so not really worth changing anything in on that front.

The NMT-suggestion was just a thought. I just saw a potential shortcut solving the NRecord RUN and multiple instances among others.
I guess in NMT-mode NextPVR never starts playback of files locally on the server, which is what causes errors.
I wouldn’t be surprised if there are some “IF NMT THEN” in your NextPVR code, I suspect the same Ifs will be needed for the Touch stuff since the concept of it all is pretty much the same.

sub Wrote:From memory, the Control modifier is 0x20000. The Alt modifier is 0x40000. "Or" those with the keycode for "P"

Thanks, I'll try the modifiers...


/Fred
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,304
Threads: 864
Joined: May 2006
#9
2013-09-15, 08:12 PM
fred250 Wrote:You get URLs alright. They play nicely using /stream as long as they don't contain any accented filenames.

I see the URL in response to /activity after it already started playing on the backend and it isn't in response to /control.

Martin
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#10
2013-09-15, 08:36 PM
mvallevand Wrote:I see the URL in response to /activity after it already started playing on the backend and it isn't in response to /control.

Martin

Yeah, that's pretty much how it works I guess.
I would have preferred an asynchronous picture stream such as Motion Jpeg and action as an AJAX callback to a /control request.
I added an onload – checkActivity() (pseudo) to the image object and forgot about til you brought it up.

If you stop whats playing in the background in the windows client the response to /activity will be empty. It seems like /activity only streams the file webclient.xml from ..Users\Public\NPVR. NextPVR seem to keep the file updated.

/Fred
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (11): 1 2 3 4 5 … 11 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 4,420 2022-04-11, 04:30 PM
Last Post: mandai
  Extending end time. mvallevand 5 3,304 2018-10-17, 01:21 PM
Last Post: jcole998
  NextPVR "Service" Backend? jcole998 5 3,887 2018-05-24, 01:17 PM
Last Post: jcole998
  Transcoding service mvallevand 27 9,930 2016-08-26, 07:43 PM
Last Post: sub
  Extending recording time mvallevand 2 1,853 2014-09-14, 01:04 AM
Last Post: sub
  Touch and http audio url's mvallevand 0 1,061 2013-11-03, 07:05 PM
Last Post: mvallevand
  <StartTime> and <EndTime> time formats? spinnaker 3 1,905 2013-10-25, 01:48 AM
Last Post: spinnaker
  New web service clarification needed bgowland 6 2,337 2013-10-19, 02:36 AM
Last Post: bgowland
  [REQ] Additional web service API calls reven 26 5,880 2013-08-31, 10:08 PM
Last Post: mvallevand
  getting recurring recordings from service?method API? reven 2 1,435 2013-08-03, 10:50 PM
Last Post: reven

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode