Struct VideoPlayer
Add this component to an entity to create a video player.
Namespace: Unity.Tiny.Video
Syntax
public struct VideoPlayer : IComponentData
Remarks
This component is required to play a video clip, and to set options such as whether or not to display the video player controls, whether to loop the video, etc.
Fields
clip
The clip entity. Attach a VideoClip to it to play a video. The video is muted by default.
Declaration
[EntityWithComponents(new Type[]{typeof(VideoClip)})]
public Entity clip
Field Value
Type | Description |
---|---|
Entity |
controls
If true, video controls (Play/Pause/FullScreen/Volume) are displayed.
Declaration
public bool controls
Field Value
Type | Description |
---|---|
System.Boolean |
currentTime
Current playback time, in seconds
Declaration
public double currentTime
Field Value
Type | Description |
---|---|
System.Double |
loop
If true, the player automatically seeks back to the start of the video after reaching the end. This attribute is ignored if the entity has a VideoPlayerAutoDeleteOnEnd component.
Declaration
public bool loop
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
Default
Declaration
public static VideoPlayer Default { get; }
Property Value
Type | Description |
---|---|
VideoPlayer |