Play and pause a video

Last update: 2023-10-02

You can add Browser 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 state.

    2. To start playback, call the Browser TVSDK play method:

      play() → {AdobePSDK.PSDKErrorCode.SUCCESS}
    3. To pause playback, call the Browser TVSDK pause method:

      void pause() throws IllegalStateException;
  2. Listen for the AdobePSDK.MediaPlayerStatusChangeEvent event to check for errors or to take other appropriate actions.

    Browser TVSDK triggers this event when pause or play methods are called and passes information about the event object, including the new state, such as MediaPlayerStatus.PLAYING or MediaPlayerStatus.PAUSED.

On this page