GetAudioLanguageCode
7/14/25Less than 1 minute
VideoPlayer.GetAudioLanguageCode(number trackIndex)
Returns the language code, if any, for the specified track.
Parameters:
| Name | Type | Description |
|---|---|---|
| trackIndex | number | Index of the audio track to query. |
Returns:
| type | Description |
|---|---|
| string | Language code. |
Usage
---@type VideoPlayer
local videoplayer;
---@type number
local trackIndex;
local val0 = videoplayer.GetAudioLanguageCode(trackIndex)Extra Detail
For URL sources, this will only be set once the source preparation is completed. See VideoPlayer.Prepare.

