"sablerock" wrote:
http://edge1.tikilive.com:1935/unrestricted_tikilive/33657/amlst:A2YknBd37xGD/playlist.m3u8?i=YXBwTmFtZT1VbnJlc3RyaWN0ZWQmY0lEPTMzNjU3JmNOYW1lPWNybnN0dWRpb2xpdmUmb0lEPTEzNDE1OCZvTmFtZT1jcm5kaWdpdGFsdGFsaw==
http://edge1.tikilive.com:1935/roku_tik ... ylist.m3u8
"sablerock" wrote:
NEW PROBLEM:
My HLS host provider implemented a security feature that has crippled my video stream. The content is open source, so I don't mind posting the link:
http://edge1.tikilive.com:1935/unrestri ... FsdGFsaw==
The original link was as follows:
http://edge1.tikilive.com:1935/roku_tik ... ylist.m3u8
Can someone please tell me why my player can no longer pull up the stream, and how I can fix it?
Erik
appName=Unrestricted&cID=33657&cName=crnstudiolive&oID=134158&oName=crndigitaltalk
"jnelson" wrote:
So I've gotten HLS to work with my roku box, and have figured out how to write and encode it using the XML file. But i'm trying to write an if statement to detect when the HLS stream is offline with something like isStreamStarted() or perhaps with isRequestFailed() so something like:
if isRequestFailed() = -5
print "The stream is currently offline"
end if
Would this work? If so, where and which Source file would you recommend this being placed?
We're using the video player template for our channel.
When i'm connected to the debugging console - and I click on one of the offline HLS streams it gives me the output of
"ButtonPressed
showHomeScreen | msg = ConnectionContext failure | index = 0
Video status: 0 0
showHomeScreen | msg = Unspecified or invalid track path/url. | index = 0
Video status: 0 0
showHomeScreen | msg = | index = -5
Video request failure: -5 1
showHomeScreen | msg = | index = 0
Screen closed"
If you need to see the code, I can post that as well, but I haven't made many changes from the original Video player template.
Duration : 00:00:05.839
Delay : 2000.000000
Delay : 2s 0ms
Delay : 2s 0ms
Delay : 2s 0ms
Delay : 00:00:02.000
<item sdImg="http://sample.com/roku/videoplayer/images/sd_logo.jpg" hdImg="http://sample.com/roku/videoplayer/images/hd_logo.jpg">
<title>Content</title>
<contentId>10002</contentId>
<contentType>LiveTV</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>HLS</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>700</streamBitrate>
<streamUrl>http://sample.net/live/s/xdph/ipad_in.m3u8?p=38&cf=1483253940&e=1483253940&h=48d0ac76464d5c50ae49dd53189bc3ad</streamUrl>
</media>
<synopsis>It a test video</synopsis>
<genres>kids</genres>
<runtime>5000</runtime>
</item>
Function parse_show_feed(xml As Object, feed As Object) As Void
showCount = 0
showList = xml.GetChildElements()
for each curShow in showList
'for now, don't process meta info about the feed size
if curShow.GetName() = "resultLength" or curShow.GetName() = "endIndex" then
goto skipitem
endif
item = init_show_feed_item()
'fetch all values from the xml for the current show
item.hdImg = validstr(curShow@hdImg)
item.sdImg = validstr(curShow@sdImg)
item.ContentId = validstr(curShow.contentId.GetText())
item.Title = validstr(curShow.title.GetText())
item.Description = validstr(curShow.description.GetText())
item.ContentType = validstr(curShow.contentType.GetText())
item.ContentQuality = validstr(curShow.contentQuality.GetText())
item.Synopsis = validstr(curShow.synopsis.GetText())
item.Genre = validstr(curShow.genres.GetText())
item.Runtime = validstr(curShow.runtime.GetText())
item.HDBifUrl = validstr(curShow.hdBifUrl.GetText())
item.SDBifUrl = validstr(curShow.sdBifUrl.GetText())
item.StreamFormat = validstr(curShow.streamFormat.GetText())
if item.StreamFormat = "" then 'set default streamFormat to mp4 if doesn't exist in xml
item.StreamFormat = "hls"
endif
'map xml attributes into screen specific variables
item.ShortDescriptionLine1 = item.Title
item.ShortDescriptionLine2 = item.Description
item.HDPosterUrl = item.hdImg
item.SDPosterUrl = item.sdImg
item.Length = strtoi(item.Runtime)
item.Categories = CreateObject("roArray", 5, true)
item.Categories.Push(item.Genre)
item.Actors = CreateObject("roArray", 5, true)
item.Actors.Push(item.Genre)
item.Description = item.Synopsis
'Set Default screen values for items not in feed
item.HDBranded = false
item.IsHD = false
item.StarRating = "90"
item.ContentType = "episode"
'media may be at multiple bitrates, so parse an build arrays
for idx = 0 to 4
e = curShow.media[idx]
if e <> invalid then
item.StreamBitrates.Push(strtoi(validstr(e.streamBitrate.GetText())))
item.StreamQualities.Push(validstr(e.streamQuality.GetText()))
item.StreamUrls.Push(validstr(e.streamUrl.GetText()))
endif
next idx
showCount = showCount + 1
feed.Push(item)
skipitem:
next
End Function