Api > VideoPlayer > GetTargetAudioSource()
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:⚓︎
Name | Type | Description |
---|---|---|
trackIndex | number | Index of the audio track for which the AudioSource is wanted. |
Returns:⚓︎
type | Description |
---|---|
AudioSource | The source associated with the audio track. |
Usage⚓︎
---@type VideoPlayer
local videoplayer;
---@type number
local trackIndex;
local val0 = videoplayer.GetTargetAudioSource(trackIndex)