VideoPlayerBaseBehaviour is the component to control VideoPlayer in the AR scene.
A VideoPlayerBaseBehaviour can be added to any object and the Video will be displayed on top of the object.
It should be child or grandchild to an ImageTargetBaseBehaviour to use the auto scale.
To play a transparent video, you need to set the object material to display alpha channel. EasyAR provides a sample material TransparentVideo.mat .
|None||0||Do not scale.|
|Fill||1||Fill the ImageTarget, video will be scaled to the same size of Imagetarget.|
|Fit||2||Fit the ImageTarget, video will be scaled to max that can fit into the Imagetarget.|
|FitWidth||3||Fit the ImageTarget width, video width will be set to the same value of Imagetarget width and the video ratio will be kept unchanged.|
|FitHeight||4||Fit the ImageTarget height, video height will be set to the same value of Imagetarget height and the video ratio will be kept unchanged.|
|XY||1||Scale on XY plane.|
|XZ||2||Scale on XZ plane.|
|YX||4||Scale on YX plane.|
|YZ||6||Scale on YZ plane.|
|ZX||8||Scale on ZX plane.|
|ZY||9||Scale on ZY plane.|
Enables auto play. If enabled, when video finished open and ready, it will automatically start to play.
Enables loop play. If enabled, when video reach end, it will play again from the start.
Open Video when MonoBehaviour.Start
Display unsupport message on platforms that are not supported.
Video path. The set operation should be called before Open. See StorageType for more details.
Video storage type. The set operation should be called before Open. See StorageType for more details.
Video type. The set operation should be called before Open.
The VideoPlayer object. You can reach advanced controls with VideoPlayer. See VideoPlayer for more details.
The base factor for video scale. It will be multiplied to the scaled size when scale. Normally you can set 0.1 for plane and 1 for other simple objects.
The scale mode.
The plane used for scale. Object size will be adjusted according to the scale mode and ImageTarget size in the plane direction.
Current volume. Use after a successful Open.
Closes the video.
Starts or continues to play video.
Pauses the video playback.
Stops the video playback.
Seek to play to position . Use after a successful Open.
Returns the current position of video. Use after a successful Open.
Returns the video duration. Use after a successful Open.
Returns the video size. Use after a successful Open.
Returns the video height. Use after a successful Open.
Event for video open error and play error.
Event when video reaches end.
Event when video finished open and ready for play. You can start to play when this event triggers.