Navigation
API > API/Runtime > API/Runtime/MediaAssets > API/Runtime/MediaAssets/UMediaPlayer
Description
Open the specified media source.
A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!
| Name | OpenSource |
| 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 OpenSource
(
UMediaSource * MediaSource
)
true if the source will be opened, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| MediaSource | The media source to open. |
See Also
-
OpenUrl
-
Reopen