Navigation
API > API/Runtime > API/Runtime/Media > API/Runtime/Media/IMediaTracks
Description
Returns the duration of a specific track.
If a media file contains multiple tracks each track may have different duration and the overall media duration is typically reported as that from the longest track.
For some applications it may be required to know the exact track duration for processing, which is what this method returns if the media container, as well as the media player used for playback has the ability to provide it.
| Name | GetTrackDuration |
| Type | function |
| Header File | /Engine/Source/Runtime/Media/Public/IMediaTracks.h |
| Include Path | #include "IMediaTracks.h" |
virtual TOptional < FTimespan > GetTrackDuration
(
EMediaTrackType TrackType,
int32 TrackIndex
) const
The duration of the track if known.
Parameters
| Name | Remarks |
|---|---|
| TrackType | The type of track to query. |
| TrackIndex | The index of the track to query. |