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: 
PRiZM4ALL
Reel Rookie

Video End Action

Jump to solution
I have a very newbie question at the end of a video how do you add an event to return to another key event or player state? Hope I am saying this correct. As of now I have a small video player on the Detail page as you highlight and select the video it goes fullscreen. What would be the proper event handler at the end of the video to return to the small player like hitting the back button on the remote? Thanks and sorry if I am not making sense I am very new to this? Not sure How to implement it.


else if m.focusKey=6
m.demoVideo.height=scale(720)
m.demoVideo.width=scale(1280)
m.demoVideo.translation=[scale(0),scale(0)]
m.demoVideo.enableUI=true
m.demoVideo.enableTrickPlay=true
m.demoVideo.setFocus(true)
0 Kudos
1 Solution

Accepted Solutions
destruk
Binge Watcher

Re: Video End Action

Jump to solution
Set an observer for the video.state variable, and when it is "finished" your video or playlist playback has completed, and your observer will call the function you specified when you set the observer.  You should be handling 'most' of the state changes - if only to track an error condition.

View solution in original post

1 REPLY 1
destruk
Binge Watcher

Re: Video End Action

Jump to solution
Set an observer for the video.state variable, and when it is "finished" your video or playlist playback has completed, and your observer will call the function you specified when you set the observer.  You should be handling 'most' of the state changes - if only to track an error condition.