Skip to main content

Media Controls

This plugin is a list of external media that are pre-defined and setup ahead of time by the world creator.
The playlist has two parts to it: the inspector and the template

Getting Started

ProTV comes with couple pre-made setup for the Media Controls plugin. This can be found in the Packages/ArchiTech.ProTV/Samples/Prefabs/Plugins folder. Just drag the desired MediaControls prefab into the scene and assign your desired TV to it. You can adjust various aspects of the playlists as desired.
If you want to have the MediaControls send the URLs to a Queue instead of directly to the TV, just add a Queue to the scene and connect it to the respective slot.

Inspector

ALL of the following references are optional, except the TV reference. You can remove any of them to customize the component as you wish. Any component reference not provided will simply be skipped.

TV References

  • TV
    The instance of ProTV that this component will interact with and send media to. You will need to insert the desired TV reference (the game object with the TVManager script on it), or if you are using a ready-made prefab, it should already be connected.

  • Queue Optional field where you can specify a Queue plugin object that you wish to make the playlist connect with. If a Queue is provided, then instead of immediately playing the URL a user clicks on, the playlist will forward the desired URL entry into the Queue directly and the Queue then handles the rest.

Media Inputs

  • Main Url Input
    Input field component for the primary URL. If this component is present and both of the Alternate and Title components are disabled or missing, when the user inputs text and exits input, the URL will automatically be sent to the TV. Otherwise the ChangeMedia event on the MediaControls will need to be triggered for the urls to be send to the TV (or Queue). This is typically handled with the Send Inputs button component below.

  • Main Url Default
    The text that the main url input field resets to after the inputs have been sent. THIS IS NOT USED FOR ANY AUTOPLAY.

  • Alternate Url Input
    Input field component for the secondary URL. This url can be used for various purposes, typically is used as mobile platform url, with main url being for PC.

  • Alternate Url Default
    The text that the alternate url input field resets to after the inputs have been sent. THIS IS NOT USED FOR ANY AUTOPLAY.

  • Title Input
    Input field component for the descriptive label of the urls being provided.

  • Title Default
    The text that the title input field resets to after the inputs have been sent

  • Send Inputs
    Button component which, when present, connected and enabled, will require pressing for the input fields to be collected and sent to the TV.

  • Url Switch
    Toggle component which causes the TV to prefer using the alternate URL over the main URL. By default PC prefers main and android(quest) prefers alternate. Enabling the url switch will invert the preferences.
    This preference can be unified by the TV's Prefer Alternate URL for Quest option being disabled. This will make both platforms prefer the same URL, respective of the url switch state.

Media Actions

  • Play
    Button component that will trigger the Play action when interacted with. Game object will be disabled while media is playing.

  • Pause
    Button component that will trigger the Pause action when interacted with. Game object will be disabled while media is paused.

  • Stop
    Button component that will trigger the Stop action when interacted with. Game object will be disabled while media is stopped or unloaded. During loading of media, triggering stop will halt the loading state. If media was already actively playing, the stop button will need to be pressed again to stop the media.

  • Skip
    Button component that triggers the TV's Skip logic, forcing the media to seek to the end causing the media end logic to trigger.

  • Reload
    Button component that triggers the TV's media reload logic. This button is what you should be using to resync live streams if the audio/video drift becomes noticable as it does a full refresh of the media.

  • Resync
    Button component that triggers a "soft-resync". This does NOT reload the media (aka "hard-resync" or "reload"), but it instead does a micro-seek of less than 0.5s. This causes the internal media cache of the video engine to realign the audio and video content. This ONLY works on non-live content. Use Reload for live media resync.

  • Seek
    Slider component that tracks and modifies the current media time portion. This slider respects the start/end parameters for media and will track time according to those timestamp truncation values.

  • Seek Offset
    Slider component that modifies the internal offset value which the media is played back at. This value is always locally controlled and works for the TV owner as well. When value is non-0, this indicates the number of seconds behind or ahead of the canonical sync time the local media will seek to. Useful for things like karaoke. The singer should set their offset to a positive value and/or the listeners should set their offset to a negative value so voices can align with the synced media.

  • Playback Speed
    Slider component that modifies the speed at which media plays. This is a finicky feature as it currently doesn't support AVPro, only UnityVideo engine. Also when playback is sped up/slowed down, the audio pitches up/down respectively. This conditions are simply due to certain unity and udon technical limitations that we have no control over.

  • Video Player Swap
    Dropdown component which allows the user to select which video engine configuration to play the media with. This component gets automatically filled with all options at playmode/build time. If you want to use TMP text to display the options, you can enable the Use TMP toggle to automatically update the component's hierarchy with TMP components.

Video Controls

  • Mode 3d Swap
    Dropdown component which allows swapping the video's stereo rendering mode for 3D media content between supported modes.

3d Width Toggle

  • Width 3d Mode
    Button component for triggering the 3d width swap. This feature will set the flag for rendering stereo video with pixel exact 3d which treats each eye as half the video res instead of the full video res.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Half-Width 3D
    Icon with color for stereo size being half res.

  • Icons: Full-Width 3D
    Icon with color for stereo size being pixel-perfect.

Color Space Toggle

  • Color Space Correction
    Button component for switching the gamma correction for the video content on and off.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Color Corrected
    Icon with color for gamma correction enabled.

  • Icons: Color Raw
    Icon with color for no gamma correction.

Audio Controls

Volume Slider

  • Volume
    Slider component for controlling the TV's volume.

  • Icon Display
    Image component to display the Icon for the active state of the slider.

  • Icons: Volume High
    Icon with color for when volume is 100%.

  • Icons: Volume Med
    Icon with color for when volume is between 99% and 50%.

  • Icons: Volume Low
    Icon with color for when volume is between 50% and 1%.

  • Icons: Volume Off
    Icon with color for when volume is 0%, effectively mute.

Audio Mode Toggle

  • Audio Mode
    Button component for swapping between audio modes.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Audio 3d
    Icon with color for swapping to the 3D audio sources list.

  • Icons: Audio 2d
    Icon with color for swapping to the 2D audio sources list.

Mute Toggle

  • Mute
    Button component for changing the mute state.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Unmuted
    Icon with color for un-muting the TV audio.

  • Icons: Muted
    Icon with color for muting the TV audio.

Behaviour Controls

TV Lock Toggle

  • Tv Lock
    Button component for swapping the lock state of the TV.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Unlocked
    Icon with color for the TV being unlocked.

  • Icons: Locked
    Icon with color for the TV being locked

Sync Toggle

  • Sync Mode
    Button component for switching between sync being enabled or disabled. When disabled, the TV effectively ignores all sync data, turning it into a local-only TV.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Sync Enabled
    Icon with color for the TV being synced.

  • Icons: Sync Disabled
    Icon with color for local-only mode.

Loop Toggle

  • Loop Mode
    Button component for switching the media loop flag on and off.

  • Icon Display
    Image component to display the Icon for the active state of the toggle.

  • Icons: Loop Disabled
    Icon with color for looping being disabled.

  • Icons: Loop Enabled
    Icon with color for looping being enabled.

Additional Visuals

  • Empty Title Placeholder
    The text that is displayed when the title info is empty. If this is left empty, it will default to the domain of the current URL.

  • Loading Bar
    Slider component which displays a fake animation to signify that the TV is loading a URL. It will animate up to 90% over ~10s and then hold there until the URL finishes resolving.

  • Loading Spinner
    A special Transform component which will spin on the Z axis while the loading state is active.

  • Loading Spinner Container
    A special GameObject reference which will be enabled while the loading state is active/disabled when loading is inactive.

  • Loading Spin Reverse
    Flag for whether the loading spinner should rotate counter-clockwise (enabled) or clockwise (disabled).

  • Loading Spin Speed
    Multiplier value for the loading spinner speed.

  • Seek Offset Display
    Text/TMP component for displaying the numerical value for the Seek Offset slider.

  • Current Time Display
    Text/TMP component for displaying the current timestamp. If the Show Remaining Time is enabled, the value will show the remaining time as a negative number.

  • End Time Display
    Text/TMP component for displaying the end timestamp. This is not explicitly the duration of the media, but the TV's internal end time (which may be the duration).

  • Clock Time Display
    Text/TMP component for displaying the current local time of the client. Simply a convenience provided. Wholely unrelated to the TV.

  • Realtime Seek
    Whether the seekbar should update every second (disabled) or every frame (enabled)

  • Keep Inputs Text
    Flag for whether the input fields should keep their contents when sending the inputs to the TV? If this is disabled, the input default values will be used instead.

  • Show Media Owner
    Flag for whether to prefix the title display with the media owner's name.

  • Show Remaining Time
    Flag for whether to default to the remaining time as the current time text (represented by currentTime - totalTime)