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: 
Highlighted
PRiZM4ALL
Level 7

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
Level 10

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.
1 Reply
destruk
Level 10

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.