VideoPlayer is the class for video playback.
EasyAR supports normal videos, transparent videos and streaming videos. The video contents will be rendered into a texture passed into the player through SetRenderTexture.
|Error||-1||Status to indicate something wrong happen in video open or play.|
|Ready||0||Status to show video finished open and is ready for play.|
|Completed||1||Status to indicate video finished play and reached the end.|
|TransparentSideBySide||1||Transparent video, left half is the RGB channel and right half is alpha channel.|
|TransparentTopAndBottom||2||Transparent video, top half is the RGB channel and bottom half is alpha channel.|
Creates a VideoPlayer object.
Current volume. Use after a successful Open.
Pass the texture to display video into player. It should be set before Open.
Sets the video type. The type will default to normal video if not set manually. It should be called before open.
Opens a video from url with storageType .
This method is an async method. The open result and the play status while playing will be updated in the action PlayerStatusChanged. You can check if the open finished successfully and start play after a successful one.
Closes the video.
Starts or continues to play video.
Stops the video playback.
Pauses the video playback.
Returns the video duration. Use after a successful Open.
Returns the current position of video. Use after a successful Open.
Seek to play to position . Use after a successful Open.
Returns the video height. Use after a successful Open.
Returns the video size. Use after a successful Open.
Player event for video ready of finish, and errors.
See PlayerStatus for more details.