Navigation
API > API/Runtime > API/Runtime/MediaAssets > API/Runtime/MediaAssets/UMediaPlayer
Description
Select the active track of the given type.
The selected track will use its currently active format. Active formats will be remembered on a per track basis. The first available format is active by default. To switch the track format, use SetTrackFormat instead.
| Name | SelectTrack |
| Type | function |
| Header File | /Engine/Source/Runtime/MediaAssets/Public/MediaPlayer.h |
| Include Path | #include "MediaPlayer.h" |
| Source | /Engine/Source/Runtime/MediaAssets/Private/Assets/MediaPlayer.cpp |
UFUNCTION (BlueprintCallable, Category="Media|MediaPlayer")
bool SelectTrack
(
EMediaPlayerTrack TrackType,
int32 TrackIndex
)
true if the track was selected, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| TrackType | The type of track to select. |
| TrackIndex | The index of the track to select, or INDEX_NONE to deselect. |
See Also
-
SetTrackFormat