Play and pause a video
You can add pause and play buttons to pause or play your video.
- To create a pause or play button:
- Wait for the player to be in at least the prepared state.
- To start playback, call the play method:
void play() throws MediaPlayerException;
- To pause playback, call the pause() method:
void pause() throws MediaPlayerException;
- 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.