I need to be able to play streams (hls and dash) without knowing if they are live or vod, and set the start time accordingly. So far, I’ve tried just setting playStart=-1 but the results are all over the place. Most live streams do start at the edge, but some fail with buffer:search:demux.dash:Cannot seek to video at <timestamp>/<framerate>: error -36. For vod, most play the last segment and stop as expected, although some do actually still start from the beginning despite the -1.
I see from the query/media-player ECP endpoint that there is indeed an is_live attribute that’s exactly what I need, but I can’t find this in any of the Video node fields. Loopback ECP access is not allowed so I can’t simply use this.
Or a way to peek at the hls variant manifest to check for #EXT-X-ENDLIST. I do see that manifestData is available for dash, but of course manual parsing seems heavy handed.
I’d have to test it to be sure, but I’d be willing to be ECP just returns whether the Live attribute of the Content metadata has been set to true, which is something you’d have to do yourself. I don’t think the device has any way to determine whether a stream is live, but maybe someone has some ideas.
Thanks but content metadata Live is only responsible for displaying “Live” in the progress bar. Meanwhile, ECP’s is_live is indeed whether the stream is live or vod.
Interesting. Well I did say I’d have to test, and now that I have, it does look like you can get it from ECP. As you noted for HLS, it’s probably simply that live streams don’t have an ending #EXT-X-ENDLIST, but if is_live is exposed through through the Video Node, I don’t see it in the documentation. Removing #EXT-X-ENDLIST from an m3u8 file sure enough gets ECP to return true for is_live. Personally (after years of trying to fight Roku limitations and oddities), I’d take the “heavy handed” approach, but perhaps someone like @RokuBen might know something.
Any other ideas? I see that signal beacons are sent (e.g. LiveStartInitiate / VODStartInitiate). Is there any way to access this within the channel? Looks like system logs are just for http statuses?
edit: beacons can be inaccurate. Seeing VODStart* frequently for live streams.