Roku Developer Program

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

Video Playback

How to handle video resume and play in brighscript?
0 Kudos
1 REPLY 1
norcaljohnny
Level 11

Re: Video Playback

Your question is very generic and so I can only give an example as a generalization.

function onKeyEvent(key as String, press as Boolean) as Boolean
    if press then
      if key = "play"
        if (m.video.state = "playing")
            m.video.control = "pause"
          else if (m.video.state = "paused")
            m.video.control = "resume"
            return true
          end if
        end if
      end if
    end if
  return false
end function
0 Kudos