PlatformTextureMediaVideo
represents "video" media that was picked from the Platform that is
being used by a given PlatformTexture.
It exposes a set of APIs that are specifically tailored for controlling video playback.
Inherits From : PlatformTextureMediaBase
Property | Description |
---|---|
| (get) duration: ScalarSignal Specifies a 'ScalarSignal' that returns the duration of the video media in seconds. |
| (get) looping: BoolSignal Specifies a 'BoolSignal' that is representing if playback should be looping. Note that setting 'looping' to true while playback has stopped at the end will implicitly restart playback at the beginning. |
| (get) onCompleted: EventSource<void> Returns an EventSource that will fire once playback has been completed, ie. reached the end of the media and stopped. This event will only be emitted when looping is disabled. |
| (get) onLooped: EventSource<void> Returns an EventSource that will fire once playback has reached the end and has been wrapped around to the beginning while still playing. This event will only be emitted when looping is enabled. |
| (get) playing: BoolSignal Specifies a 'BoolSignal' that is representing the current 'playing' state of the video. Will evaluate to true if playing or false if paused or the video reached the end and is not looping. Note that a true 'playing' signal has no effect if the playback has completed and looping is disabled. |
| (get) progress: ScalarSignal Specifies a 'ScalarSignal' that is representing the current progress while playing back the PlatformTexture. Note that the progress normalized and is in [0.0, 1.0]. Also cf. seek() API. |
Method | Description |
---|---|
| seek(value: number): Promise<void> Seeks video playback position to 'value' for the current media. Note that the value normalized and is in [0.0, 1.0] and that this API is causing a seek operation in the underlying Video Player. Note that seeking a paused video won't implicitly start it. |