Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kazim
Channel Surfer

2 mins preview

Hi,

I've been trying to implement "2 mins preview" functionality for live stream and I tried using "SetPreviewMode(true)" function of "roVideoScreen" but it's not working. Following is the piece of code:

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.SetPreviewMode(true)
screen.SetContent(episode)
screen.Show()

Can someone please explain what is the correct way of using it?

Thanks.
0 Kudos
1 REPLY 1
RokuMarkn
Visitor

Re: 2 mins preview

You can just set PlayDuration to the amount of time in the preview. Playback will stop when it reaches the PlayDuration time.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.