Show Menu
TOPICS×

Play and pause a video

You can add TVSDK behavior to pause and play buttons.
  1. Create a pause/play button that does the following.
    1. Wait for your player to be in at least the PREPARED status.
    2. To start playback, call the TVSDK play method:
      function play():void;
      
      
    3. To pause playback, call the TVSDK pause method:
      function pause():void;
      
      
  2. Use the callback for the MediaPlayerStatusChangeEvent.STATUS_CHANGED event to check for errors or to take other appropriate actions.
    TVSDK calls this callback when the pause or play method is called. TVSDK passes information about the status change in the callback, including the new status, such as PAUSED or PLAYING.