Forum Discussion

n00bku's avatar
n00bku
Visitor
7 years ago

Trying to create a simulated live stream channel

Are there any examples of a simulated live-stream or "linear" type channel that automatically plays one video to the next upon entering it. I know this is possible with ITVC, as I've done it already, but I'm looking to do it with SDK. I can't find any info on Automatic Playback, Autoplay, etc. Please help.
  • If the list of items to be played is known in advance of the player launching, it should be fairly trivial to hand the player the playlist as it's content;
    https://sdkdocs.roku.com/display/sdkdoc/Video#Video-PlaybackFields
    otherwise, you can observe the video state field and if you get video.state = "finished", you can overwrite the content and restart the player.  Apparently you may need to re init the client certificates when doing this; here's a snip from one of my channels where I did this to autoplay the next item:
      m.Video.content = playcontent
      m.video.EnableCookies()
      m.video.SetCertificatesFile("common:/certs/ca-bundle.crt")
      m.video.InitClientCertificates()
      m.Video.control = "play"