Component:PlaybackStateDriver: Difference between revisions

From Resonite Wiki
m GreaseMonkey moved page PlaybackStateDriver to Category:PlaybackStateDriver: Moving to Component namespace
add desc, usage, see also
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=PlaybackStateDriverComponent.png
|Image=PlaybackStateDriverComponent.png
|Name=Playback State Driver
|Name=Playback State Driver
}}
}}
The '''PlaybackStateDriver''' is a component that drives a set of booleans to whether or not certain states are currently active or not for a particular [[Type:IPlayable|IPlayable]].


<!--T:2-->
<!--T:2-->
Line 12: Line 12:
{{Table ComponentFields
{{Table ComponentFields
|Source|IPlayable| Playback source - VideoTextureProvider or Playback
|Source|IPlayable| Playback source - VideoTextureProvider or Playback
|IsPlaying|IField`1|TypeString1=IField<bool>| Will drive IField<bool> to true if playing, false if not playing
|IsPlaying|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv1=true| Will drive IField<bool> to true if playing, false if not playing
|IsNotPlaying|IField`1|TypeString2=IField<bool>| Will drive IField<bool> to true is not playing, false if playing
|IsNotPlaying|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| Will drive IField<bool> to true is not playing, false if playing
|IsPaused|IField`1|TypeString3=IField<bool>| Will drive IField<bool> to true if video is paused
|IsPaused|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv3=true| Will drive IField<bool> to true if playable is paused
|IsStopped|IField`1|TypeString4=IField<bool>| Will drive IField<bool> to true if video is stopped
|IsStopped|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Will drive IField<bool> to true if playable is stopped
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and provide <code>Source</code> any [[Type:Bool|Bool]] provided to the other fields will be driven to the status of that field's status check.


<!--T:4-->
<!--T:4-->
Line 27: Line 28:


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
* [[Component:IsPlayingDriver]]
 
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Playback State Driver]]
[[Category:Components{{#translation:}}|Playback State Driver]]
[[Category:Components:Media:Utility{{#translation:}}|Playback State Driver]]
[[Category:Components:Media:Utility{{#translation:}}|Playback State Driver]]

Latest revision as of 18:22, 13 November 2024

Component image 
Playback State Driver component as seen in the Scene Inspector

The PlaybackStateDriver is a component that drives a set of booleans to whether or not certain states are currently active or not for a particular IPlayable.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
Source IPlayable Playback source - VideoTextureProvider or Playback
IsPlaying field drive of Bool Will drive IField<bool> to true if playing, false if not playing
IsNotPlaying field drive of Bool Will drive IField<bool> to true is not playing, false if playing
IsPaused field drive of Bool Will drive IField<bool> to true if playable is paused
IsStopped field drive of Bool Will drive IField<bool> to true if playable is stopped

Usage

Attach to a slot and provide Source any Bool provided to the other fields will be driven to the status of that field's status check.

Examples

Example of PlaybackStateDriver The Source (being driven by a VideoTextureProvider) is driving the ValueField<bool> Value to true, since the video is playing.

See Also