Navigation
API > API/Runtime > API/Runtime/MediaAssets > API/Runtime/MediaAssets/UMediaPlayer
Description
Set the format on the specified track.
Selecting the format will not switch to the specified track. To switch tracks, use SelectTrack instead. If the track is already selected, the format change will be applied immediately.
| Name | SetTrackFormat |
| 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 SetTrackFormat
(
EMediaPlayerTrack TrackType,
int32 TrackIndex,
int32 FormatIndex
)
true if the track was selected, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| TrackType | The type of track to update. |
| TrackIndex | The index of the track to update. |
| FormatIndex | The index of the format to select (must be valid). |