TVManager Scripting API
Methods/Events
The following is the list of events that any behavior may call to modify the TV's state (they ALL start with an underscore _):
- _ChangeMedia- The main workhorse event that handles loading whatever media is needed to be loaded (either media swap or refreshing the current one)
- Variables used for input data: IN_MAINURL,IN_ALTURL,IN_TITLE
- If neither IN_MAINURLnorIN_ALTURLnorIN_TITLEare present, then the event will treat it as a local media refresh and won't take ownership.
- If either urls are present, ownership will be taken unless enabled security measures are triggered.
- If only IN_TITLEis present, it will simply update that data.
- If the tv is locked and the user does not match the requisite permissions, the event will purge IN_MAINURL,IN_ALTURLandIN_TITLE, and simply treat the event call as a local refresh.
 
- _ChangeMedia(VRCUrl, VRCUrl, string)- UdonSharp only equivalent of the combination of IN_MAINURL,IN_ALTURL,IN_TITLEand_ChangeMedia
- To update just the title without modifying the urls, do _ChangeMedia(null, null, "My new title")
 
- UdonSharp only equivalent of the combination of 
- _ChangeVideoPlayer- This event handles the swapping of the video player configurations defined by the TV.
- Variable used for input data: IN_VIDEOPLAYER
- The variable is a 0-index array value (first entry is the value 0) representing a particular item in the TV's Video Managers list.
 
- _ChangeVideoPlayer(int)- UdonSharp only equivalent of the combination of IN_VIDEOPLAYERand_ChangeVideoPlayer
 
- UdonSharp only equivalent of the combination of 
- _TogglePlay- Swaps between playing and pausing the media.
- If the media is stopped, this event will trigger a media refresh to start it up.
 
- _Play- This event causes the current media to either start or resume, depending on the TV's current state.
 
- _Pause- This event causes the current media to suspend if there is one playing.
 
- _Stop- This event halts any currently playing media.
 
- _Skip- This event force triggers the current playing media to end.
- This will trigger the _TvPause and _TvMediaEnd events.
 
- _UseMainUrl- Force the local user to use the main url instead of the alternate one.
 
- _UseAlternateUrl- Force the local user to use the alternate url instead of the main one.
 
- _ToggleUrlMode- Swap the user between using the alternate and main urls.
 
- _ChangeUrlMode(bool)- Explicitly specify which url mode to use (true is using alternate url)
 
- _Mute- This event disables any audio output from the TV.
 
- _UnMute- This event enables any audio output from the TV.
 
- _ToggleMute- This event swaps the state of the audio outputs from the TV.
 
- _ChangeMute(bool)- UdonSharp only method that updates the state of the audio outputs from the TV, based on the provided bool parameter.
 
- _ChangeVolume- This event handles updating the volume of the TV.
- Variable used for input data: IN_VOLUME
- The variable is a float that expects a value between 0.0f and 1.0f (representing a percent of the max volume)
 
- _ChangeVolume(float)- UdonSharp only equivalent of the combination of IN_VOLUMEand_ChangeVolume
 
- UdonSharp only equivalent of the combination of 
- _ToggleVideoForce2d- This event swaps the flag that tells shaders whether they should be allowed to show 3D or only 2D content.
- Does not apply during the blit operation, but instead is passed as a "request" type of value to the shaders via the shader _VideoData matrix.
 
- _ToggleColorCorrection- This event swaps the flag for whether to implicitly apply gamma correction to the video content or not.
 
- _EnableColorCorrection- This event enables the implicit gamma correction flag.
 
- _EnableColorCorrection- This event disabled the implicit gamma correction flag.
 
- _ChangeColorCorrection(bool)- UdonSharp only method for setting the implicit gamma correction flag to a particular state.
 
- _Change3DMode(int)- UdonSharp only method for switching which stereo 3D video mode the shaders should render.
- Currently supports Side-By-Side and Over-Under along with their eye-swapped variants.
- See the Video Data Documentation for more information.
- Note: In this API, negative numbers are not allowed. Instead use the 3D Width api calls below to modify that setting.
 
- _Toggle3DWidth- This event will swap the rendering flag for stereo video pixel precision.
 
- _Width3DFull- This event will set the flag for rendering stereo video with pixel exact 3d which treats each eye as half the video res (depending on the 3d mode setting).
 
- _Width3DHalf- This event will set the flag for rendering stereo video with pixel exact 3d which treats each eye as pixel exact res (depending on the 3d mode setting).
 
- _Change3DWidth(bool)- UdonSharp only method for setting the stereo pixel width flag to a particular state.
 
- _ToggleVideoForce2d- This event swaps whether or not the shaders should enforce non-stereo rendering when stereo content is declared.
 
- _AudioMode3d- This event switches any audio outputs from a stereo mode, to a positional audio mode.
 
- _AudioMode2d- This event switches any audio outputs from a positional audio mode, to a stereo mode.
 
- _ToggleAudioMode- This event swaps the audio output mode between positional and stereo, based on it's current value.
 
- _ChangeAudioMode(bool)- UdonSharp only method that updates the mode of the audio outputs, based on the provided bool parameter.
- If the bool is true, the audio is positional (3d). If false, the audio is stereo (2d).
 
- _ReSync- This event makes the TV recalculate the local play time from the synced owner playtime.
- Media (especially long-form) can some times drift from their synced time. This helps mitigate that issue.
 
- _Sync- This event forces the TV to conform to any synchronized data changes.
- When in this state, the TV will always attempt to adjust itself so that it stays in sync with the current TV owner.
 
- _DeSync- This event forces the TV to ignore any synchronized data changes
- This only applies to non-owners. It can allow viewers to watch the media at their own pace. For example if someone has to step away for a moment, they could de-sync and then pause the media. Then when they come back, they can choose to re-sync with the owner, or continue watching from where the left off.
 
- _ToggleSync- This event swaps the sync flag to the opposite of its current state.
 
- _ChangeSync(bool)- UdonSharp only method that updates the sync flag based on the provided bool parameter.
 
- _LoopStart- This event enables the TV's media looping logic.
 
- _LoopStop- This event disables the TV's media looping logic.
 
- _ToggleLoop- This event swaps the media looping logic between enabled and disabled.
 
- _ChangeLoop(bool)- UdonSharp only method that updates the enabled state of the media looping logic.
 
- _ChangeSeekPercent- This event updates the current time of the actively playing media.
- The variable is a float that expects a value between 0.0f and 1.0f (representing a percent of the total media duration)
- Commonly updated via some sort of slider.
- Variable used for input data: IN_SEEK
 
- _ChangeSeekPercent(float)- UdonSharp only equivalent of the combination of IN_SEEKand_ChangeSeekPercent
 
- UdonSharp only equivalent of the combination of 
- _ChangeSeekTime- This event updates the current time of the actively playing media.
- Expects a float representing the time in seconds to seek the media to.
- Variable used for input data: IN_SEEK
 
- _ChangeSeekTime(float)- UdonSharp only equivalent of the combination of IN_SEEKand_ChangeSeekTime
 
- UdonSharp only equivalent of the combination of 
- _ChangeSeekPercent- This event updates the current time of the actively playing media based on the percent value passed.
- Variable used for input data: IN_SEEK
- Expects a normalized 0 to 1 float value representing the point in the media to skip to.
- This is primarily useful for UI sliders to control the seek position.
 
- _ChangeSeekPercent(float)- UdonSharp only equivalent of the combination of IN_SEEKand_ChangeSeekPercent
 
- UdonSharp only equivalent of the combination of 
- _SeekForward- This event implicitly fast-forwards the seek time by 10 seconds.
 
- _SeekBackward- This event implicitly rewinds the seek time by 10 seconds.
 
- _ChangeSeekOffset- This event sets the local playback offset from the canonical playback time.
- Positive value plays ahead (typically used for karaoke singers)
- Negative value plays behind (like if a listener hears the karaoke singer too late and wants to correct for that)
- This works even if you are the owner of the TV.
- Variable used for input data: IN_SEEK
 
- _ChangeSeekOffset(float)- UdonSharp only equivalent of the combination of IN_SEEKand_ChangeSeekOffset
 
- UdonSharp only equivalent of the combination of 
- _ChangePlaybackSpeed- This event sets the local playback speed of the selected video manager (engine).
- Allows values between half-speed 0.5fand double-speed2f.
- Variable used for input data: IN_SPEED
 
- _ChangePlaybackSpeed(float)- UdonSharp only equivalent of the combination of IN_SPEEDand_ChangePlaybackSpeed
 
- UdonSharp only equivalent of the combination of 
- _ResetPlaybackSpeed- This event returns the playback speed to normal speed 1f.
 
- This event returns the playback speed to normal speed 
- _Lock- This event tells the TV to only allow the instance master to manage the sync data (media swapping/synced seeking)
- This event implicitly assigns the instance master as the TV owner.
 
- _UnLock- This event tells the TV to allow anyone to manage the sync data (media swapping/synced seeking)
 
- _ToggleLock- This event swaps the locked state of the TV to the opposite of its current state.
- This event will ignore any calls to it that aren't from the instance master.
 
- _ChangeLock(bool)- UdonSharp only method that updates the locked state based on the bool parameter.
- This method will ignore any calls to it that aren't from the instance master.
 
- _EnableInteractions- This event will run through all its listeners and attempt to find all UIShapes' colliders and re-enable them.
- This restores intractability with the given UI elements that the UIShapes are connected to.
 
- _DisableInteractions- This event will run through all its listeners and attempt to find all UIShapes' colliders and disable them.
- This halts intractability with the given UI elements that the UIShapes are connected to preventing the player from clicking on anything in them.
 
- _ToggleInteractions- This event swaps back and forth between _EnableInteractionsand_DisableInteractions.
- Easy to use with a UI button or custom interact script.
 
- This event swaps back and forth between 
- _ChangeInteractions(bool)- UdonSharp only method that updates the interaction state for associated plugins.
 
- _EnableVideoTexture- This event causes the TV to enable rendering the video engine texture to the rendering outputs.
- This is on by default.
 
- _DisableVideoTexture- This event causes the TV to skip rendering the video engine texture to the rendering outputs.
- Will cause any fallback images to be displayed instead (if available).
 
- _ToggleVideoTexture- This event swaps back and forth between _EnableVideoTextureand_DisableVideoTexture.
- Easy to use with a UI button or custom interact script.
 
- This event swaps back and forth between 
- _EnableGlobalTexture- This event tells teh TV to render the _Udon_VideoTextexture reference to enable access from avatars.
- This is typically enabled by default.
- Global texture should only ever be active on one TV instance at a time.
 
- This event tells teh TV to render the 
- _DisableGlobalTexture- This event tells the TV to stop rendering the _Udon_VideoTextexture reference to disable access from avatars.
 
- This event tells the TV to stop rendering the 
- _ToggleGlobalTexture- This event swaps back and forth between _EnableGlobalTextureand_DisableGlobalTexture.
- Easy to use with a UI button or custom interact script.
 
- This event swaps back and forth between 
- _IsManagedSpeaker(AudioSource)- UdonSharp only helper method to know whether a given AudioSource is considered to be managed by the TV.
- It will check against all connected VPManagers, regardless of state.
 
Inherited from ArchiTech.SDK
- _RegisterListener- This event assigns a given behavior as a listener of the TV.
- Variables used for input data: IN_LISTENERandIN_PRIORITY
- This event should be called during the Startevent phase of a behavior and should simply assign the behavior's own reference to theIN_LISTENERvariable along with optionally setting theIN_PRIORITYvariable to a number between -128 and 127 inclusively, where -128 is the highest priority. 0 is the default.
- An example is available in the Plugins Documentation page.
 
- _RegisterListener(UdonSharpBehaviour)- UdonSharp only equivalent of the combination of IN_LISTENERand_RegisterListener
- This is generally done like this: tv._RegisterListener(this);
- The method itself will convert it to a standard UdonBehavior, so don't worry about that.
- The priority defaults to 0 when using this method.
 
- UdonSharp only equivalent of the combination of 
- _RegisterListener(UdonSharpBehaviour, sbyte)- UdonSharp only equivalent of the combination of IN_LISTENER,IN_PRIORITYand_RegisterListener
- This is generally done like this: tv._RegisterListener(this, 10);
- The method itself will convert it to a standard UdonBehavior, so don't worry about that.
- The priority is a number between -128 and 127 inclusively, with 127 being the highest priority.
 
- UdonSharp only equivalent of the combination of 
- _UnregisterListener- This event directly removes the UdonBehaviour from the registered listeners.
- Variables used for input data: IN_LISTENER
- The behaviour will no longer receive events and must be re-registered to restore event reception.
 
- _UnregisterListener(UdonSharpBehaviour)- UdonSharp only equivalent of the combination of IN_LISTENERand_UnregisterListener
 
- UdonSharp only equivalent of the combination of 
- _DisableListener- This event flags a specific registered behaviour as to be muted, ie. it will not receive any events from the TV.
- This keeps the listener as connected to the tv, but ignores the events.
- Variables used for input data: IN_LISTENER
 
- _DisableListener(UdonSharpBehaviour)- UdonSharp only equivalent of the combination of IN_LISTENERand_DisableListener
 
- UdonSharp only equivalent of the combination of 
- _EnableListener- This event flags a specific registered behaviour as to be un-muted, ie. it will resume receiving the events from the TV.
- Variables used for input data: IN_LISTENER
 
- _EnableListener(UdonSharpBehaviour)- UdonSharp only equivalent of the combination of IN_LISTENERand_EnableListener
 
- UdonSharp only equivalent of the combination of