MediaPlayerState creates an instance that controls video states internally,
which can be shared between media components and control components.
The simplest workflow is to create a
MediaPlayerState, and hook it with components:
To control video playback, you can directly call functions on
Create a new MediaPlayerState.
@param options (optional) - Configure the initial state.
Begin or resume playback.
Seek to a position of the video @param timeSec - the position seek to.
Register for calling a command on a Video on a user gesture on a Component @param commandID - the command id. @param commandArgs - the command arguments. @param reactTag - the tag of the component that listen to the user gesture.
Unregister for calling a command on a Video on a user gesture on a Component @param reactTag - the tag of the component that listen to the user gesture.
Set the volume of the media (0.0 ~ 1.0). Default is 1.0
Whether the audio should be muted. Default is false.
You can file an issue on GitHub if you see a typo or error on this page!