I was able to get a live stream from a series of Nest Cams working on a Roku channel.
Here are the steps I took:
1) Downloaded the new version of the videoplayer-channel sample channel from the developer site.
2) Customized the sources/VideoScene.brs file by changing the url= field on line 22 to point to a categories.xml file on a webserver of mine.
3) Then I altered the cover images a bit. Then, zip up the modified code, and side-load into your roku.
4) Set NestCam to be public, and browse to the public view of the camera (given in the settings page).
5) Find the url of the public stream
- right click on the camera video, and choose "Inspect Element" (I'm using Firefox...not sure of the exact nomenclature on other browsers)
- The Document Inspector will take you to the part of the page that looks something like this:
<video class="nexustalk-player" preload="auto" autoplay="" data-poster="model.posterImage" src="blob:https://video.nest.com/<long_hex_code_here>" width="100%" height="100%"></video>
- Right click on the link that starts with "blob:https://video.net.com..." and select COPY->Inner HTML. The result will look like this. I pasted it to a text doc for easy use.
<source src="https://stream-alfa.dropcam.com:443/nexus_aac/<LONG_HEX_CODE_HERE>/playlist.m3u8" type="application/x-mpegURL"> <source src="rtmps://stream-alfa.dropcam.com/nexus/<LONG_HEX_CODE_HERE" type="rtmp/mp4">
The server may be slightly different for each cam. So far, I've seen 'alfa' and 'delta'.
- Copy the full url that ends in "/playlist.m3u8"
- In your XML file on the webserver for whichever category you want to show this video in, use this URL as the stream source.
- MAKE SURE TO CHANGE THE <streamFormat> tag to "hls". THIS TOOK ME A LONG TIME TO FIGURE OUT, and was the key. My XML item for this looks like this:
<item sdImg="http://www.<MYSERVER>.com/rokudev/examples/videoplayer/images/nest_sd.png" hdImg="http://www.<MYSERVER>.com/rokudev/examples/videoplayer/images/nest_hd.png">
<title> Cam #1</title>
<contentId>11001</contentId>
<contentType>Live</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>HD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>https://stream-alfa.dropcam.com:443/nexus_aac/<LONG_HEX_CODE_HERE>/playlist.m3u8</streamUrl>
</media>
<synopsis>CAMERA #1</synopsis>
<genres>Security</genres>
<runtime></runtime>
</item>
I think that's pretty much it. I developed the initial channel under the old SDK, so I'm still trying to get up to speed on the newer stuff, so the XML file may not be up in the current format, but it is working.