Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
calengineer
Level 7

Loop video indefinitely

I've managed to create a full working channel with categories and several stacks of screens until you get to the video. 

The channel works great but once I play any video and finishes, it stops and goes back to the previous screen. Which is perfect is most cases but that is not what I want.

However, I'm confused as to where in my code do I set up that I want the video to loop indefinitely seamlessly or to show an image while its buffering to load again. I need the video to loop indefinitely for hours until someone presses the back button or another button.

Thanks in advance. 
0 Kudos
2 Replies
Skilovan
Level 7

Re: Loop video indefinitely

I just started learning Roku development so let's try to figure this out together.
In doc's i did find this: "loop - If set to true, the video or video playlist (if the contentIsPlaylist field is set to true to enable video playlists) will be restarted from the beginning after the end is reached.Available since firmware version 7.2"
So you could use this to loop your last video.Also, Video Node is where you should set this since Video Node is responsible for video playback.

nextContentIndex - you can use this also and just pass index of the last video that was playing from the playlist.But i think it's not great idea since you have loop option for this.

You should check  https://sdkdocs.roku.com/display/sdkdoc/Video for more info .

Sorry if  my answer did not help you or if you already checked this options.
0 Kudos

Re: Loop video indefinitely

@skilovan: the problem with that I faced is that upon reaching the end of video, the screen blanks out and then buffers again, instead of just playing the video as it is already fetched...
0 Kudos