Class VisionOSVideoComponent
The mesh renderer on which the video should render. Overwrites the current material on the renderer.
Inherited Members
Namespace: Unity.PolySpatial
Assembly: Unity.PolySpatial.dll
Syntax
public class VisionOSVideoComponent : MonoBehaviour
Properties
clip
The video asset to play.
Declaration
public VideoClip clip { get; set; }
Property Value
| Type | Description |
|---|---|
| VideoClip |
isLooping
Whether the video should repeat when playback reaches the end of the clip.
Declaration
public bool isLooping { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
playOnAwake
Whether video clip should play on awake.
Declaration
public bool playOnAwake { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
targetMaterialRenderer
The mesh renderer on which the video should render. Overwrites the current material on the renderer.
Declaration
public MeshRenderer targetMaterialRenderer { get; set; }
Property Value
| Type | Description |
|---|---|
| MeshRenderer |
Methods
GetDirectAudioMute(ushort)
Gets the mute status of first track on the video clip.
Declaration
public bool GetDirectAudioMute(ushort trackIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | trackIndex | The track index (indices greater than 0 not supported). |
Returns
| Type | Description |
|---|---|
| bool | The mute status of first track on the video clip. |
GetDirectAudioVolume(ushort)
Gets the volume of the first track on the video clip.
Declaration
public float GetDirectAudioVolume(ushort trackIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | trackIndex | The track index (indices greater than 0 not supported). |
Returns
| Type | Description |
|---|---|
| float | The volume between 0.0 and 1.0 |
GetState()
Obtain the current play state of the video player.
Declaration
public VisionOSVideoComponent.PlayerState GetState()
Returns
| Type | Description |
|---|---|
| VisionOSVideoComponent.PlayerState | The player state. |
Pause()
Pauses the playback of the video.
Declaration
public void Pause()
Play()
Starts playback of the video.
Declaration
public void Play()
SetDirectAudioMute(ushort, bool)
Sets the mute state of the first track on the video clip.
Declaration
public void SetDirectAudioMute(ushort trackIndex, bool mute)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | trackIndex | The track index (indices greater than 0 not supported). |
| bool | mute | The mute state to set. |
SetDirectAudioVolume(ushort, float)
Sets the volume of the first track on the video clip.
Declaration
public void SetDirectAudioVolume(ushort trackIndex, float volume)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | trackIndex | The track index (indices greater than 0 not supported). |
| float | volume | The volume to set between 0.0 and 1.0. |
Stop()
Stops the playback of the video.
Declaration
public void Stop()