Navigation
API > API/Runtime > API/Runtime/MediaAssets > API/Runtime/MediaAssets/UMediaPlayer
Description
Seeks to the specified playback time as soon as possible.
If the player is currently seeking, the new seek request will be queued and executed as soon as the current one is completed. It will guarantee that at least one sample of the previous seek makes it to the sample queue. if new seek requests are performed in rapid succession (as in scrubbing), the requests are aggregated and only the most recent request will be performed. As a result, OnSeekCompleted event is only sent for the request that got performed.
If the player is not currently seeking, Seek will be called immediately.
| Name | Scrub |
| 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 Scrub
(
const FTimespan & Time
)
true on success, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| Time | The playback time to set. |
See Also
- Seek