Skip to main content

VideoPlayer.GetTargetAudioSource(number trackIndex)

Gets the AudioSource that will receive audio samples for the specified track if VideoPlayer.audioOutputMode is set to VideoAudioOutputMode.AudioSource.

Parameters:

NameTypeDescription
trackIndexnumberIndex of the audio track for which the AudioSource is wanted.

Returns:

typeDescription
AudioSourceThe source associated with the audio track.

Usage

---@type VideoPlayer
local videoplayer;

---@type number
local trackIndex;


local val0 = videoplayer.GetTargetAudioSource(trackIndex)