Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preview of new Web based RIVA client
The issue here is dynamic loading of javascript. Kurento (and probably various other scenarios that might come to light) require some of their javascript to be run on the client. So I set it up such that there's a WebCamSetup.js file that we define. Initially as shipped it's just a do nothing file so that if you don't use any web cams then it costs you nothing.

But you can change it to do other things. But, since it can do anything potentially, it has to be able to dynamically load any other javascript that it depends on. And there's where the problem lies currently.
Dean Roddey
Software Geek Extraordinaire
Reply
I put in some more hours on this today, and still failed to get anything to work. So I'm going to have to try to back up and come at it from some other angle.
Dean Roddey
Software Geek Extraordinaire
Reply
OK, I came up with a scheme that works. There are two files now:

/WebRIVAExt/WebRIVAInsert.js
/WebRIVAExt/WebCamSetup.js

WebRIVAInsert.js just writes stuff into the header. It's included in the <head> of the WebRIVA HTML file, and it just does a document.write() command to write contents into header. So it can write out needed meta lines for specific platforms, and in the case of Kurento it can write out <script> tags to load the required files.

WebCamSetup.js is also included now in the WebRIVA HTML file's <head> section can can do whatever you need to do to set up a video element to stream from the configured URL.

By default, if neither of them exist, the installer will write empty ones that just do nothing, which will be fine for folks who don't have any special needs. You can then update them as required. I'll provide any pre-worked out ones such as for Kurento, in sub-directories that you can just copy up over the default ones.
Dean Roddey
Software Geek Extraordinaire
Reply
So some progress has been made. Bryan got video, though it seems to just show an initial frame and not go any further. And there were issues with keeping it positioned and cleaning it up. I got the positioning stuff fixed. And I was working on the cleanup, and I'm getting some utterly bizarre results.

When I hit a button to swap to another overlay, to test the cleanup of the video elements, I see in the browser console messages from the cleanup method before it ever runs. I have break points in that clean up method and they never get hit. I also see a message from the Kurento stuff about cleaning and I have break points on those lines and they don't get hit.

So, before the debugger ever stops in that method, it has to have been called twice, because I see a message where it says it cleaned it up and the Kurento cleanup messages, and then I see one that says it couldn't find the video element to clean up because it was already gone, then I get a break point, and trace through it and don't find the element again because it's already gone.

That is utterly weird. I know it's not just something else is calling it, since that would still have to hit the breakpoints and stop. It's being invoked somehow without ever stopping. I guess it must be some weird typescript debugger bug or something. But why it's getting called multiple times I can't figure out.
Dean Roddey
Software Geek Extraordinaire
Reply
Not much heard here lately. Other than the web cam stuff, which I'm still working on, how is this guy doing? Is it working so well than no one has anything to complain about, at least that hasn't already been complained about?
Dean Roddey
Software Geek Extraordinaire
Reply
Its been working pretty good for me. There are a couple formatting things with the scrolling widget that catch my eye but I haven't had time to document them.
|Z-Wave|Sonos|Tivo|Hue|Plex|Roku|MyMovies|Echo|
Nest|Harmony|Neeo|LG TV|Smarthings|
Reply
(08-31-2017, 08:30 PM)Dean Roddey Wrote: Not much heard here lately. Other than the web cam stuff, which I'm still working on, how is this guy doing? Is it working so well than no one has anything to complain about, at least that hasn't already been complained about?

Working great on iPads. Way faster and more reliable than the old IOS Riva app. Thanks again for all your effort with this.
_______________
Denon 3808ci, 2112ci , SONOS, Russound CAA66,Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,iTunes,TED5000,Somfy RTS blinds, Amazon Echo, Google Home, Polk XRT12,
Honeywell Wi-Fi 9000 & Caleo Wi-Fi Thermostats, Rainmachine
Reply
I have to disagree a little.. I have also been using it daily and although it works very well. I have one major problem with it. When I set the APP (safari) to background it looses connection. When I return it has to reconnect and takes a good few seconds. The old RIVA app stays connected in the background and when returned to foreground it's instant. I can also say in my particular case the IOS RIVA app is still snappier feeling than the WebRIVA replacement.

I am wholly impressed with the current development. Unfortunately it feels like a step back. I can post a video if anyone is unclear with what I am referring to.
Reply
(09-01-2017, 03:34 AM)NightLight Wrote: I have to disagree a little.. I have also been using it daily and although it works very well. I have one major problem with it. When I set the APP (safari) to background it looses connection. When I return it has to reconnect and takes a good few seconds. The old RIVA app stays connected in the background and when returned to foreground it's instant. I can also say in my particular case the IOS RIVA app is still snappier feeling than the WebRIVA replacement.

I am wholly impressed with the current development. Unfortunately it feels like a step back. I can post a video if anyone is unclear with what I am referring to.

NightLight, Just tested my iPads and the disconnect happens every time with Safari(switching out of background tab). When I use Chrome on iPads CQC stays connected in the background for much longer. Must be a "Hidden Page Timer Throttling" or other timer. I bet Dean can hunt down the browser system call to disable or extend background tab in Safari.
_______________
Denon 3808ci, 2112ci , SONOS, Russound CAA66,Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,iTunes,TED5000,Somfy RTS blinds, Amazon Echo, Google Home, Polk XRT12,
Honeywell Wi-Fi 9000 & Caleo Wi-Fi Thermostats, Rainmachine
Reply
Actually, it's completely up to the browser how much time background stuff is given. Native apps have more leeway on this front. Since people are often fairly casual about opening tabs and leaving them open, browser on battery powered devices have gotten more and more extreme with throttling them. I'm already doing the communications via a web worker so that it can run in the background and have less chance of being throttled. But ultimately it's purely up to the browser what they want to do. And what they do has changed this way and that in different versions. Back in Chrome 57 apparently they really limited background tabs. I think a lot of folks complained and maybe they backed off that.

If there's any means to do it, it will be more likely your call not ours, since it will probably have to be done in the browser settings. If you search for Chrome and disable tab throttling, you can find some instructions for disabling it. There may be something similar for Safari. Apparently with Chrome you can start it with the flag:

--disable-background-timer-throttling

to disable that throttling for specific applications if want.

I'm guessing Safari is throttling it so much that it can't keep up the conversation with the server and loses the connection. Some application will just quit drawing when in the background, but RIVA clients have to keep their drawing going because they can only draw what they've been sent. They can't just redraw when they come back forward again.

Anyway, first step would be to search for some Safari settings/options to disable background throttling. Or maybe use Chrome if that's an option and use its throttle disabling option.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  The RIVA Comm Buf Mgr pool is full and cannot be expanded any further zra 52 3,708 05-14-2017, 08:54 PM
Last Post: Dean Roddey
  HTTP-based Trigger Driver Docs znelbok 5 651 03-11-2017, 09:34 PM
Last Post: Dean Roddey
  Client Side Drivers pinballmark 2 583 12-13-2016, 01:31 PM
Last Post: pinballmark
  Room config HTML based app preview Dean Roddey 5 712 11-05-2016, 02:53 PM
Last Post: Dean Roddey
  5.0 Preview Stuff Dean Roddey 108 6,666 11-01-2016, 11:06 AM
Last Post: Dean Roddey
  Repository + RIVA problems chmilar 7 801 03-29-2016, 02:14 PM
Last Post: Dean Roddey
  4.8.2 preview Dean Roddey 18 1,226 01-26-2016, 12:59 PM
Last Post: Dean Roddey
  Repointing CQC Client to new server address? Deane Johnson 11 1,241 11-10-2015, 02:11 AM
Last Post: Deane Johnson
  Client won't connect Deane Johnson 12 1,319 10-30-2015, 03:18 PM
Last Post: Deane Johnson
  Graphing on IOS Client zra 1 899 04-04-2015, 09:29 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)