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.