Play and pause a video

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

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now