Sub RunUserInterface()
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
port = CreateObject("roMessagePort")
videoScreen = CreateObject("roVideoScreen")
videoScreen.setMessagePort(port)
videoScreen.SetPositionNotificationPeriod(10)
videoclip = {}
videoclip.StreamUrls = ["URL.m3u8"]
videoclip.StreamFormat = "hls"
videoclip.ContentType = "movie"
videoclip.title = "MOVIE"
videoclip.StreamBitrates = [0]
videoclip.playstart = 0
videoclip.StreamQualities = ["SD"]
videoclip.SwitchingStrategy = "full-adaptation"
videoScreen.SetContent(videoclip)
videoScreen.show()
nowpos = 0
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event'
print "Closing video screen"
exit while
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
print nowpos
else if msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
else if msg.isFullResult()
print "isFullResult"
else if msg.isPartialResult()
print "isPartialResult, nowpos = ";nowpos
else if msg.isStreamStarted()
print "isStreamStarted"
else
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
end if
else
print "Event: ";type(msg)
print msg.GetInfo()
end if
end while
print "Exiting app"
screenFacade.showMessage("")
sleep(25)
End Sub
"RokuChris" wrote:
Assuming you've implemented the encryption according to the HLS spec using the #EXT-X-KEY tag, you don't necessarily have to do anything in BrightScript to make it work. The firmware will handle it automatically. You may need to add a call to SetCertificatesFile() to get any HTTPS requests working.
http://sdkdocs.roku.com/display/sdkdoc/ ... thasString)asBoolean
With AES Encryption. I have the same problem. Did you find any solution for this?