Play and pause a video

You can add pause and play buttons to pause or play your video.

  1. To create a pause or play button:

    1. Wait for the player to be in at least the prepared state.

    2. To start playback, call the play method:

      void play() throws MediaPlayerException;
    3. To pause playback, call the pause() method:

      void pause() throws MediaPlayerException;
  2. Use the status changed event callback to check for errors or to take other appropriate actions.

    TVSDK calls this callback for pause() or play() and passes information about the status change, including the new status, such as paused or playing.

On this page