Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zuber
Visitor

Re: SSL "broke" my channel [SOLVED]

Can you please share your sample file?

I am not able to figure out which file to edit exactly.

Thanks
0 Kudos
YoJae
Visitor

Re: SSL "broke" my channel [SOLVED]

Hi guys,

I am trying to stream an HLS/TS video thru https (It is an m3u8 file that contains links to streams of different qualities)

As I understood the idea,
- I first call https.roUrlTransfer("https://myUrl") with the URL to the playlist file,
- then pass https.GetToString() to player.SetContentList ?

This way the contentList is a playlist? Please help 🙂


port = CreateObject("roMessagePort")

player = CreateObject("roVideoPlayer")
player.SetMessagePort(port)
player.setCGMS(3)
player.SetLoop(false)
player.SetPositionNotificationPeriod(1)
player.SetDestinationRect(this.canvas.GetCanvasRect())
player.SetCertificatesFile("common:/certs/ca-bundle.crt")
player.SetCertificatesDepth(25)

https = CreateObject("roUrlTransfer")
https.SetUrl(streamUrl)
https.SetCertificatesFile("common:/certs/ca-bundle.crt")
https.AddHeader("X-Roku-Reserved-Dev-Id", "")
https.setcertificatesdepth(8)
https.InitClientCertificates()

rsps = https.GetToString()

player.SetContentList([CreateVideoContent( rsps, playbackTime)])
...

function CreateVideoContent( rsps ,playbackTime)
print "Stream URL: " rsps

bitrates =[128,384,882,1384,1500,1800]

content = {
Stream: { url: rsps , format: "HLS" } ,
qualities:["HD"],
StreamBitrates:bitrates,
PlayStart:playbackTime,
SwitchingStrategy:"minimum-adaptation",
minBandWidth:64,
Live:true,
...




---DEBUG---

Stream URL: #EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=1698523,CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=640x360
chunklist_w56297g.m3u8

*** ERROR: Invalid path: '#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=1698523,CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=640x360
chunklist_w56297g.m3u8
'

P.S. Without an https part this works just fine through http.
0 Kudos