Play and pause a video
You can add TVSDK behavior to pause and play buttons.
- Create a pause/play button that does the following.
- Wait for your player to be in at least the PREPARED status.
- To start playback, call the TVSDK play method:
- To pause playback, call the TVSDK pause method:
- 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.