Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preview of new Web based RIVA client
Dean, here is the link to the Kurento github that has the html and js code to display a WebRTC stream in a browser: 

https://github.com/lulop-k/kurento-rtsp2webrtc

Seems like you would need something like this to receive and display the WebRTC stream in the CQC WebRIVA client.

But I maybe wrong. It's happened before.
Reply
That stuff, it looks to me, is just setting up the Kurento server. Presumably you then point our web cam widget at that Kurento web server instance. I guess you'd run multiple instances of it, on different ports, if you need to process more than one camera feed.
Dean Roddey
Software Geek Extraordinaire
Reply
So going back and forth with Bryan about the Korento thing, it looks like we might have to change our strategy. If you look at the sample they give, basically it's two files (plus a bunch of supporting stuff.) They have an HTML file that includes a video element, and it gets a URL from you for the RTSP stream. And they have a javascript file that it invokes. That guy looks up the video element, gets the source URL stream from you, then runs Korento specific code to set up the video element to play the stream.

So, it doesn't just create a URL you can point the video client at, apparently. We obviously cannot put this Korento code into our client because we don't want to be specific to any particular server. And of course eventually some folks may come out with WebRTC enabled devices as well that we'd hopefully be able to stream directly from.

So, instead of me creating a video element for each web cam widget, I'm thinking I should just create a borderless popup browser window (similar to what I'll do for a web browser widget.) The URL you configure will then be used to load that browser window. It can then do whatever it wants. In the case of Korento, you'd host an HTML and javascript file on our Web Server. The HTML file would basically just import the required javscript files and the HTML itself would just be a full screen video element. The javascript that gets invoked when the page loads would then just run the bare minimum stuff from the example Korento javascript file. Just the bits that set up the playback. There's a bunch of goop in there related to getting the URL input from you and validating that and having a start/stop handler and all that. The actual code related to starting up the playback is a small part of it.

Obviously, I'll want to provide separate configurable URLs for IV vs. WebRIVA clients, and use the appropriate one based on which one it is. You can point the IV one at the original RTSP stream, and configure the other one to point to your 'kicker' file on our Web Server.

This also has the benefit of keeping any video playback, and the possible havoc it could cause, out of our main browser widget. It'll be in a separate window that will go away when the web cam widget does.

Does this make sense?
Dean Roddey
Software Geek Extraordinaire
Reply
Tomorrow I'll see about making the change from a video element to a popup window. I need to figure that out for the web browser widget anyway. And, ultimately, this way both the web camera and the web widget will be implemented exactly the same.

Given the above idea, I would assume that, if something like VLC is available on your mobile platform, you could potentially use that as well. As long as you can gen up whatever needs to be gen'd up via javascript, you can pretty much do whatever you want.

It also opens up the possibility of adding things like video controls as well, since you'd control the HTML that loads into the popup window.

Utlimately, the goal would be that, once we sort of collectively work out what html/javascript is the thing to make a given scenario work, I can take that, abstract it, and just ship it as a pre-fab scenario. You'll have to still set up the WebRTC converter server or install VLC or whatever the scenarios happen to be. But, once that's done, we can have a URL that you just point at, and pass it some query parameters that it needs, and it'll do the setup necessary.

You'll always be able to role your own or use some system that no one else has even tried, but we can also provide some pre-worked out options as well. I can't figure out all of these things myself, since I don't have the bits and pieces myself. But I'll help with the working out. I guess we can start with Korento and figure out the minimal javascript that would be necessary to make that happen, then some of you can try it and we can bang on it till it works. Then I'll create a generic version of that and add it to the build.

I'll also go ahead and add the second optional 'mobile' URL for the web cam widget as well, and pass that to the WebRIVA client if it's configured.
Dean Roddey
Software Geek Extraordinaire
Reply
Dean, The WebRiva has been such a big improvement I even hate to bring up something I am seeing. I consider it a feature so not looking to fix but wanted to point out my observation. Of my 4 wall mounted WebRiva clients, they all seem to disconnect/reconnect once or twice a day. randomly.  Now I like that because it gets me back to the home page(My kids cannot clean rooms or remember to go back to home screen after use).
Didn't see anything in the logs but my xmradio driver is still cycling ever few hours so not sure if that is a contributor.
Must be a heartbeat thing because it seems random.

Again not looking to fix but wanted to point out just in case someone else was puzzled by the behavior.
K
_______________
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
Hmmm... Not sure why that would be happening. It's not related to any sort of user interaction, it just happens on its own?
Dean Roddey
Software Geek Extraordinaire
Reply
(08-09-2017, 07:23 AM)Dean Roddey Wrote: Hmmm... Not sure why that would be happening. It's not related to any sort of user interaction, it just happens on its own?

Correct. I am sitting on the couch and I see the iPad on the wall do a re-connect(goes white and reconnects to home screen).
_______________
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
Though we can't log anything to the CQC logs while it's disconnected, maybe I can try to remember the issue and log it when it comes back up.
Dean Roddey
Software Geek Extraordinaire
Reply
could be you WiFi re-authenticating? Could be your DHCP refresh with the route?
I also noted it, but did not give it much of thought.

On a separate note, my Harmony hubs are disconnecting/reconnecting random, and could not find a reason, Logitech blames it on my WiFi.
Reply
Well, thanks Mr. Hacker again. Apparently now it's impossible now to create a popup window without the title and location bars. That means it's impossible to fit them into the web cam/browser widget area as though they were part of the underlying window. Nor will it stay on top of the browser if you click on something else.

So they are pretty useless unless I'm missing something very obvious.
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,713 05-14-2017, 08:54 PM
Last Post: Dean Roddey
  HTTP-based Trigger Driver Docs znelbok 5 657 03-11-2017, 09:34 PM
Last Post: Dean Roddey
  Client Side Drivers pinballmark 2 588 12-13-2016, 01:31 PM
Last Post: pinballmark
  Room config HTML based app preview Dean Roddey 5 716 11-05-2016, 02:53 PM
Last Post: Dean Roddey
  5.0 Preview Stuff Dean Roddey 108 6,673 11-01-2016, 11:06 AM
Last Post: Dean Roddey
  Repository + RIVA problems chmilar 7 809 03-29-2016, 02:14 PM
Last Post: Dean Roddey
  4.8.2 preview Dean Roddey 18 1,234 01-26-2016, 12:59 PM
Last Post: Dean Roddey
  Repointing CQC Client to new server address? Deane Johnson 11 1,246 11-10-2015, 02:11 AM
Last Post: Deane Johnson
  Client won't connect Deane Johnson 12 1,323 10-30-2015, 03:18 PM
Last Post: Deane Johnson
  Graphing on IOS Client zra 1 905 04-04-2015, 09:29 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: Mark Stega, 1 Guest(s)