IMediaPlayer::Open

Open a media source from a file or memory archive with optional parameters.

Windows
MacOS
Linux

Override Hierarchy

IMediaPlayer::Open()

FMediaIOCorePlayerBase::Open()

References

Module

Media

Header

/Engine/Source/Runtime/Media/Public/IMediaPlayer.h

Include

#include "IMediaPlayer.h"

Syntax

bool Open
(
    const TSharedRef< FArchive, ESPMode::ThreadSafe > & Archive,
    const FString & OriginalUrl,
    const IMediaOptions * Options
)

Remarks

Open a media source from a file or memory archive with optional parameters.

The media may not necessarily be opened after this function succeeds, because opening may happen asynchronously. Subscribe to the MediaOpened and MediaOpenFailed events to detect when the media finished or failed to open. These events are only triggered if Open returns true.

The optional parameters can be used to configure aspects of media playback and are specific to the type of media source and the underlying player. Check their documentation for available keys and values.

Returns

true if the media is being opened, false otherwise.

Parameters

Parameter

Description

Archive

The archive holding the media data.

OriginalUrl

The original URL of the media that was loaded into the buffer.

Options

Optional media parameters.

See Also

Close

IsReady

OnOpen

OnOpenFailed

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss