Table of Contents

Class FrontendHandler

Namespace
JLChnToZ.VRC.VVMW

The playlist, queue list and history list handler for VizVid.

public class FrontendHandler : UdonSharpEventSender, IVizVidCompoonent
Inheritance
FrontendHandler
Implements

Fields

NONE

protected const byte NONE = 0

Field Value

byte

REPEAT_ALL

protected const byte REPEAT_ALL = 2

Field Value

byte

REPEAT_ONE

protected const byte REPEAT_ONE = 1

Field Value

byte

SHUFFLE

protected const byte SHUFFLE = 4

Field Value

byte

core

public Core core

Field Value

Core

Properties

CurrentPlayingIndex

The entry index of the current playing item, relative to the current playlist.

public int CurrentPlayingIndex { get; }

Property Value

int

HasQueueList

Whether the queue list is enabled.

public bool HasQueueList { get; }

Property Value

bool

HistorySize

How many history items to keep.

public int HistorySize { get; }

Property Value

int

HistoryTitles

The titles of the history items.

public string[] HistoryTitles { get; }

Property Value

string[]

HistoryUrls

The URLs of the history items.

public VRCUrl[] HistoryUrls { get; }

Property Value

VRCUrl[]

Locked

Whether the frontend is locked.

public bool Locked { get; }

Property Value

bool

Remarks

This is meant to integrate with external permission systems.

PendingCount

How many items left on the queue list or playlist.

public int PendingCount { get; }

Property Value

int

PlayListEntryTitles

The titles of the playlist entries.

public string[] PlayListEntryTitles { get; }

Property Value

string[]

Remarks

The returned array is meant to be read only, do not modify.

PlayListIndex

The playlist index (1-based) of the current playing item. If the value is 0, it means it is not playing from a playlist.

public int PlayListIndex { get; }

Property Value

int

PlayListPlayerIndex

The player index of the playlist entries.

public byte[] PlayListPlayerIndex { get; }

Property Value

byte[]

Remarks

This is 1-based index. 0 is reserved for future use.

PlayListTitles

All titles of the playlists.

public string[] PlayListTitles { get; }

Property Value

string[]

Remarks

The returned array is meant to be read only, do not modify.

PlayListUrlOffsets

public int[] PlayListUrlOffsets { get; }

Property Value

int[]

Remarks

The offset is the index of the first element of next playlist. It means if you want to query playlist X, the actual range will be offsets[X - 1] to offsets[X] - 1. The returned array is meant to be read only, do not modify.

PlayListUrls

The URLs of the playlists.

public VRCUrl[] PlayListUrls { get; }

Property Value

VRCUrl[]

Remarks

The returned array is meant to be read only, do not modify.

PlayListUrlsQuest

The URLs of the playlists for Quest (mobile).

public VRCUrl[] PlayListUrlsQuest { get; }

Property Value

VRCUrl[]

Remarks

The returned array is meant to be read only, do not modify.

QueuePlayerIndex

The player backend index of the queued items.

public byte[] QueuePlayerIndex { get; }

Property Value

byte[]

Remarks

This is 1-based index, 0 is invalid.

QueueTitles

The titles of the queued items.

public string[] QueueTitles { get; }

Property Value

string[]

Remarks

The returned array is meant to be read only, do not modify.

QueueUrls

The URLs of the queued items.

public VRCUrl[] QueueUrls { get; }

Property Value

VRCUrl[]

Remarks

The returned array is meant to be read only, do not modify.

RepeatAll

Should the frontend repeats all items.

public bool RepeatAll { get; set; }

Property Value

bool

RepeatOne

Should the frontend repeats the current item.

public bool RepeatOne { get; set; }

Property Value

bool

Shuffle

Should the frontend shuffles the playlist.

public bool Shuffle { get; set; }

Property Value

bool

Methods

LoadDynamicPlaylist(VRCUrl)

public void LoadDynamicPlaylist(VRCUrl url)

Parameters

url VRCUrl

NoRepeat()

Disables all repeat modes.

public void NoRepeat()

OnDeserialization()

public override void OnDeserialization()

OnPreSerialization()

Event entry point when the video player is about to synchronize. Internal use, do not invoke this.

public override void OnPreSerialization()

OnVideoEnd()

Event entry point from video backend when the video finishes. Internal use, do not invoke this.

public override void OnVideoEnd()

OnVideoPause()

Event entry point from video backend when the video is paused. Internal use, do not invoke this.

public override void OnVideoPause()

OnVideoPlay()

Event entry point from video backend when the video starts playing. Internal use, do not invoke this.

public override void OnVideoPlay()

OnVideoReady()

Event entry point from video backend when the video is ready. Internal use, do not invoke this.

public override void OnVideoReady()

OnVideoStart()

Event entry point from video backend when the video is started. Internal use, do not invoke this.

public override void OnVideoStart()

PlayAt(int, int, bool)

Play (and/or delete) the item at the specified index of the specified list.

public void PlayAt(int playListIndex, int entryIndex, bool deleteOnly)

Parameters

playListIndex int

The index of the playlist (1-based). 0 for queue list, -1 for history list

entryIndex int

The index of the entry in the playlist or queue list. -1 to play the next item or random if shuffle is enabled.

deleteOnly bool

Instead of playing, just delete the item. Only works with queue list.

Remarks

If requested entry is at the queue list, it will be removed.

PlayHistory(int)

Play the history item at the specified index.

public void PlayHistory(int index)

Parameters

index int

The index of the history item.

PlayUrl(VRCUrl, byte)

public void PlayUrl(VRCUrl url, byte index)

Parameters

url VRCUrl
index byte

PlayUrl(VRCUrl, VRCUrl, byte)

public void PlayUrl(VRCUrl pcUrl, VRCUrl questUrl, byte index)

Parameters

pcUrl VRCUrl
questUrl VRCUrl
index byte

PlayUrl(VRCUrl, VRCUrl, string, byte)

Play or enqueue a video URL.

public void PlayUrl(VRCUrl pcUrl, VRCUrl questUrl, string queuedTitle, byte index)

Parameters

pcUrl VRCUrl

The URL of the video for PC.

questUrl VRCUrl

The URL of the video for Quest (mobile).

queuedTitle string

The title of the video to be displayed in the queue list.

index byte

The player index (1-based) to play the video.

Remarks

If queue list is enabled and the player is playing or loading, the URL will be enqueued. Except if it is playing an entry of a playlist, in this case will always intrrupts the current playback.

UpdateState()

protected void UpdateState()

_AutoPlay()

Apply default playback order settings and play the default playlist.

public void _AutoPlay()

_GlobalSync()

Force every client to reload the current URL. This is meant to be called by the user interaction.

public void _GlobalSync()

_LocalSync()

Reload the current URL. This is meant to be called by the user interaction.

public void _LocalSync()

Remarks

When this method is invoked twice in a short time, it will request the owner to sync the player.

_Lock()

public void _Lock()

_OnTitleData()

public void _OnTitleData()

_OnUnlock()

public void _OnUnlock()

_Pause()

Pause the current item.

public void _Pause()

_Play()

Play or resume the current item.

public void _Play()

_PlayAt(int, int, bool)

Play (and/or delete) the item at the specified index of the specified list.

[Obsolete("Use PlayAt instead.")]
public void _PlayAt(int playListIndex, int entryIndex, bool deleteOnly)

Parameters

playListIndex int

The index of the playlist (1-based). 0 for queue list, -1 for history list

entryIndex int

The index of the entry in the playlist or queue list. -1 to play the next item or random if shuffle is enabled.

deleteOnly bool

Instead of playing, just delete the item. Only works with queue list.

Remarks

If requested entry is at the queue list, it will be removed.

_PlayNext()

Play the next item in the queue list or playlist.

public void _PlayNext()

_Skip()

Skips current item and play the next one.

public void _Skip()

_Stop()

Stops current item and clears the queue list.

public void _Stop()

_TriggerUIUpdate()

public void _TriggerUIUpdate()