unreal.MediaPlayer
¶
- class unreal.MediaPlayer(outer=None, name='None')¶
Bases:
unreal.Object
Implements a media player asset that can play movies and other media sources.
C++ Source:
Module: MediaAssets
File: MediaPlayer.h
Editor Properties: (see get_editor_property/set_editor_property)
affected_by_pie_handling
(bool): [Read-Write] Affected by PIEHandling: Whether this player should stop when entering or exiting PIE.cache_ahead
(Timespan): [Read-Write] Cache Ahead: Duration of samples to cache ahead of the play head. see: CacheBehind, CacheBehindGamecache_behind
(Timespan): [Read-Write] Cache Behind: Duration of samples to cache behind the play head (when not running as game). see: CacheAhead, CacheBehindGamecache_behind_game
(Timespan): [Read-Write] Cache Behind Game: Duration of samples to cache behind the play head (when running as game). see: CacheAhead, CacheBehindhorizontal_field_of_view
(float): [Read-Write] Horizontal Field Of View: The initial horizontal field of view (in Euler degrees; default = 90).This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function. see: GetHorizontalFieldOfView, SetHorizontalFieldOfView, VerticalFieldOfView, ViewRotation
loop
(bool): [Read-Write] Loop: Whether the player should loop when media playback reaches the end.Use the SetLooping function to change this value at runtime. see: IsLooping, SetLooping
native_audio_out
(bool): [Read-Write] Native Audio Out: Output any audio via the operating system’s sound mixer instead of a Sound Wave asset.If enabled, the assigned Sound Wave asset will be ignored. The SetNativeVolume function can then be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms. see: SetNativeVolume
on_end_reached
(OnMediaPlayerMediaEvent): [Read-Write] On End Reached: A delegate that is invoked when playback has reached the end of the media.on_media_closed
(OnMediaPlayerMediaEvent): [Read-Write] On Media Closed: A delegate that is invoked when a media source has been closed.on_media_open_failed
(OnMediaPlayerMediaOpenFailed): [Read-Write] On Media Open Failed: A delegate that is invoked when a media source has failed to open.This delegate is only executed if OpenSource / OpenUrl returned true and the media failed to open asynchronously later. It is not executed if OpenSource / OpenUrl returned false, indicating an immediate failure. see: OnMediaOpened
on_media_opened
(OnMediaPlayerMediaOpened): [Read-Write] On Media Opened: A delegate that is invoked when a media source has been opened.Depending on whether the underlying player implementation opens the media synchronously or asynchronously, this event may be executed before or after the call to OpenSource / OpenUrl returns. see: OnMediaOpenFailed, OnTracksChanged
on_playback_resumed
(OnMediaPlayerMediaEvent): [Read-Write] On Playback Resumed: A delegate that is invoked when media playback has been resumed. see: OnPlaybackSuspendedon_playback_suspended
(OnMediaPlayerMediaEvent): [Read-Write] On Playback Suspended: A delegate that is invoked when media playback has been suspended. see: OnPlaybackResumedon_seek_completed
(OnMediaPlayerMediaEvent): [Read-Write] On Seek Completed: A delegate that is invoked when a seek operation completed successfully.Depending on whether the underlying player implementation performs seeks synchronously or asynchronously, this event may be executed before or after the call to Seek returns.
on_tracks_changed
(OnMediaPlayerMediaEvent): [Read-Write] On Tracks Changed: A delegate that is invoked when the media track collection changed. see: OnMediaOpenedplay_on_open
(bool): [Read-Write] Play on Open: Automatically start playback after media opened successfully.If disabled, listen to the OnMediaOpened Blueprint event to detect when the media finished opening, and then start playback using the Play function. see: OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Play
playlist
(MediaPlaylist): [Read-Write] Playlist: The play list to use, if any.Use the OpenPlaylist or OpenPlaylistIndex function to change this value at runtime. see: OpenPlaylist, OpenPlaylistIndex
playlist_index
(int32): [Read-Write] Playlist Index: The current index of the source in the play list being played.Use the Previous and Next methods to change this value at runtime. see: Next, Previous
shuffle
(bool): [Read-Write] Shuffle: Whether playback should shuffle media sources in the play list. see: OpenPlaylist, OpenPlaylistIndextime_delay
(Timespan): [Read-Write] Time Delay: Delay of the player’s time. see: SetTimeDelay, GetTimeDelayvertical_field_of_view
(float): [Read-Write] Vertical Field Of View: The initial vertical field of view (in Euler degrees; default = 60).This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function.
Please note that some 360 video players may be able to change only the horizontal field of view, and this setting may be ignored. see: GetVerticalFieldOfView, SetVerticalFieldOfView, HorizontalFieldOfView, ViewRotation
view_rotation
(Rotator): [Read-Write] View Rotation: The initial view rotation.This setting is used only for 360 videos. It determines the rotation of the video’s view. To modify the view orientation at runtime in Blueprints, use the GetViewRotation and SetViewRotation functions.
Please note that not all players may support video view rotations. see: GetViewRotation, SetViewRotation, HorizontalFieldOfView, VerticalFieldOfView
- property affected_by_pie_handling¶
[Read-Write] Affected by PIEHandling: Whether this player should stop when entering or exiting PIE.
- Type
(bool)
- property cache_ahead¶
[Read-Write] Cache Ahead: Duration of samples to cache ahead of the play head. see: CacheBehind, CacheBehindGame
- Type
(Timespan)
- property cache_behind¶
[Read-Write] Cache Behind: Duration of samples to cache behind the play head (when not running as game). see: CacheAhead, CacheBehindGame
- Type
(Timespan)
- property cache_behind_game¶
[Read-Write] Cache Behind Game: Duration of samples to cache behind the play head (when running as game). see: CacheAhead, CacheBehind
- Type
(Timespan)
- can_pause() bool ¶
Check whether media playback can be paused right now.
Playback can be paused if the media supports pausing and if it is currently playing. see: CanPlay, Pause
- Returns
true if pausing playback can be paused, false otherwise.
- Return type
- can_play_source(media_source) bool ¶
Check whether the specified media source can be played by this player.
If a desired player name is set for this player, it will only check whether that particular player type can play the specified source. see: CanPlayUrl, SetDesiredPlayerName
- Parameters
media_source (MediaSource) – The media source to check.
- Returns
true if the media source can be opened, false otherwise.
- Return type
- can_play_url(url) bool ¶
Check whether the specified URL can be played by this player.
If a desired player name is set for this player, it will only check whether that particular player type can play the specified URL. see: CanPlaySource, SetDesiredPlayerName
- close() None ¶
Close the currently open media, if any. see: OnMediaClosed, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Pause, Play
- get_audio_track_channels(track_index, format_index) int32 ¶
Get the number of channels in the specified audio track. see: GetAudioTrackSampleRate, GetAudioTrackType
- Parameters
track_index (int32) – Index of the audio track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Number of channels.
- Return type
int32
- get_audio_track_sample_rate(track_index, format_index) int32 ¶
Get the sample rate of the specified audio track. see: GetAudioTrackChannels, GetAudioTrackType
- Parameters
track_index (int32) – Index of the audio track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Samples per second.
- Return type
int32
- get_audio_track_type(track_index, format_index) str ¶
Get the type of the specified audio track format. see: GetAudioTrackSampleRate, GetAudioTrackSampleRate
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Audio format type string.
- Return type
- get_desired_player_name() Name ¶
Get the name of the current desired native player. see: SetDesiredPlayerName
- Returns
The name of the desired player, or NAME_None if not set.
- Return type
- get_duration() Timespan ¶
Get the media’s duration. see: GetTime, Seek
- Returns
A time span representing the duration.
- Return type
- get_horizontal_field_of_view() float ¶
Get the current horizontal field of view (only for 360 videos). see: GetVerticalFieldOfView, GetViewRotation, SetHorizontalFieldOfView
- Returns
Horizontal field of view (in Euler degrees).
- Return type
- get_media_name() Text ¶
Get the human readable name of the currently loaded media source. see: GetPlayerName, GetUrl
- Returns
Media source name, or empty text if no media is opened
- Return type
- get_num_track_formats(track_type, track_index) int32 ¶
Get the number of formats of the specified track. see: GetNumTracks, GetSelectedTrack, SelectTrack
- Parameters
track_type (MediaPlayerTrack) – The type of media tracks.
track_index (int32) – The index of the track.
- Returns
Number of formats.
- Return type
int32
- get_num_tracks(track_type) int32 ¶
Get the number of tracks of the given type. see: GetNumTrackFormats, GetSelectedTrack, SelectTrack
- Parameters
track_type (MediaPlayerTrack) – The type of media tracks.
- Returns
Number of tracks.
- Return type
int32
- get_player_name() Name ¶
Get the name of the current native media player. see: GetMediaName
- Returns
Player name, or NAME_None if not available.
- Return type
- get_playlist() MediaPlaylist ¶
Get the current play list.
Media players always have a valid play list. In C++ code you can use the GetPlaylistRef to get a reference instead of a pointer to it. see: GetPlaylistIndex, GetPlaylistRef
- Returns
The play list.
- Return type
- get_playlist_index() int32 ¶
Get the current play list index. see: GetPlaylist
- Returns
Play list index.
- Return type
int32
- get_rate() float ¶
Get the media’s current playback rate. see: SetRate, SupportsRate
- Returns
The playback rate.
- Return type
- get_selected_track(track_type) int32 ¶
Get the index of the currently selected track of the given type. see: GetNumTracks, GetTrackFormat, SelectTrack
- Parameters
track_type (MediaPlayerTrack) – The type of track to get.
- Returns
The index of the selected track, or INDEX_NONE if no track is active.
- Return type
int32
- get_supported_rates(unthinned)¶
Get the supported playback rates. see: SetRate, SupportsRate
- Parameters
unthinned (bool) – Whether the rates are for unthinned playback.
- Returns
out_rates (Array(FloatRange)):
- Return type
- get_time() Timespan ¶
Get the media’s current playback time. see: GetDuration, Seek
- Returns
Playback time.
- Return type
- get_time_delay() Timespan ¶
Delay of the player’s time. see: SetTimeDelay
- Returns
Delay added to the player’s time used to manually sync multiple sources.
- Return type
- get_time_stamp() MediaTimeStampInfo ¶
Get the media’s current playback timestamp. see: GetDuration, Seek
- Returns
Playback timestamp.
- Return type
- get_track_display_name(track_type, track_index) Text ¶
Get the human readable name of the specified track. see: GetNumTracks, GetTrackLanguage
- Parameters
track_type (MediaPlayerTrack) – The type of track.
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
- Returns
Display name.
- Return type
- get_track_format(track_type, track_index) int32 ¶
Get the index of the active format of the specified track type. see: GetNumTrackFormats, GetSelectedTrack, SetTrackFormat
- Parameters
track_type (MediaPlayerTrack) – The type of track.
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
- Returns
The index of the selected format.
- Return type
int32
- get_track_language(track_type, track_index) str ¶
Get the language tag of the specified track. see: GetNumTracks, GetTrackDisplayName
- Parameters
track_type (MediaPlayerTrack) – The type of track.
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
- Returns
Language tag, i.e. “en-US” for English, or “und” for undefined.
- Return type
- get_url() str ¶
Get the URL of the currently loaded media, if any. see: OpenUrl
- Returns
Media URL, or empty string if no media was loaded.
- Return type
- get_vertical_field_of_view() float ¶
Get the current vertical field of view (only for 360 videos). see: GetHorizontalFieldOfView, GetViewRotation, SetVerticalFieldOfView
- Returns
Vertical field of view (in Euler degrees), or 0.0 if not available.
- Return type
- get_video_track_aspect_ratio(track_index, format_index) float ¶
Get the aspect ratio of the specified video track. see: GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
- Parameters
track_index (int32) – Index of the video track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Aspect ratio.
- Return type
- get_video_track_dimensions(track_index, format_index) IntPoint ¶
Get the current dimensions of the specified video track. see: GetVideoTrackAspectRatio, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Video dimensions (in pixels).
- Return type
- get_video_track_frame_rate(track_index, format_index) float ¶
Get the frame rate of the specified video track. see: GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRates, GetVideoTrackType, SetVideoTrackFrameRate
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Frame rate (in frames per second).
- Return type
- get_video_track_frame_rates(track_index, format_index) FloatRange ¶
Get the supported range of frame rates of the specified video track. see: GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackType
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Frame rate range (in frames per second).
- Return type
- get_video_track_type(track_index, format_index) str ¶
Get the type of the specified video track format. see: GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
- Returns
Video format type string.
- Return type
- get_view_rotation() Rotator ¶
Get the current view rotation (only for 360 videos). see: GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation
- Returns
View rotation, or zero rotator if not available.
- Return type
- has_error() bool ¶
Check whether the player is in an error state.
When the player is in an error state, no further operations are possible. The current media must be closed, and a new media source must be opened before the player can be used again. Errors are usually caused by faulty media files or interrupted network connections. see: IsReady
- Return type
- is_buffering() bool ¶
Check whether playback is buffering data. see: IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady
- Returns
true if looping, false otherwise.
- Return type
- is_closed() bool ¶
Whether media is currently closed.
- Returns
true if media is closed, false otherwise.
- Return type
- is_connecting() bool ¶
Check whether the player is currently connecting to a media source. see: IsBuffering, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady
- Returns
true if connecting, false otherwise.
- Return type
- is_looping() bool ¶
Check whether playback is looping. see: IsBuffering, IsConnecting, IsPaused, IsPlaying, IsPreparing, IsReady, SetLooping
- Returns
true if looping, false otherwise.
- Return type
- is_paused() bool ¶
Check whether playback is currently paused. see: CanPause, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Pause
- Returns
true if playback is paused, false otherwise.
- Return type
- is_playing() bool ¶
Check whether playback has started. see: CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Play
- Returns
true if playback has started, false otherwise.
- Return type
- is_preparing() bool ¶
Check whether the media is currently opening or buffering. see: CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsReady, Play
- Returns
true if playback is being prepared, false otherwise.
- Return type
- is_ready() bool ¶
Check whether media is ready for playback.
A player is ready for playback if it has a media source opened that finished preparing and is not in an error state. see: HasError, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing
- Returns
true if media is ready, false otherwise.
- Return type
- property loop¶
[Read-Only] Loop: Whether the player should loop when media playback reaches the end.
Use the SetLooping function to change this value at runtime. see: IsLooping, SetLooping
- Type
(bool)
- property native_audio_out¶
[Read-Write] Native Audio Out: Output any audio via the operating system’s sound mixer instead of a Sound Wave asset.
If enabled, the assigned Sound Wave asset will be ignored. The SetNativeVolume function can then be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms. see: SetNativeVolume
- Type
(bool)
- next() bool ¶
Open the next item in the current play list.
The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source. see: Close, OpenUrl, OpenSource, Play, Previous, SetPlaylist
- Returns
true on success, false otherwise.
- Return type
- property on_end_reached¶
[Read-Write] On End Reached: A delegate that is invoked when playback has reached the end of the media.
- Type
- property on_media_closed¶
[Read-Write] On Media Closed: A delegate that is invoked when a media source has been closed.
- Type
- property on_media_open_failed¶
[Read-Write] On Media Open Failed: A delegate that is invoked when a media source has failed to open.
This delegate is only executed if OpenSource / OpenUrl returned true and the media failed to open asynchronously later. It is not executed if OpenSource / OpenUrl returned false, indicating an immediate failure. see: OnMediaOpened
- Type
- property on_media_opened¶
[Read-Write] On Media Opened: A delegate that is invoked when a media source has been opened.
Depending on whether the underlying player implementation opens the media synchronously or asynchronously, this event may be executed before or after the call to OpenSource / OpenUrl returns. see: OnMediaOpenFailed, OnTracksChanged
- Type
- property on_playback_resumed¶
[Read-Write] On Playback Resumed: A delegate that is invoked when media playback has been resumed. see: OnPlaybackSuspended
- Type
- property on_playback_suspended¶
[Read-Write] On Playback Suspended: A delegate that is invoked when media playback has been suspended. see: OnPlaybackResumed
- Type
- property on_seek_completed¶
[Read-Write] On Seek Completed: A delegate that is invoked when a seek operation completed successfully.
Depending on whether the underlying player implementation performs seeks synchronously or asynchronously, this event may be executed before or after the call to Seek returns.
- Type
- property on_tracks_changed¶
[Read-Write] On Tracks Changed: A delegate that is invoked when the media track collection changed. see: OnMediaOpened
- Type
- open_file(file_path) bool ¶
Opens the specified media file path.
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! see: GetUrl, Close, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen
- open_playlist(playlist) bool ¶
Open the first media source in the specified play list. see: Close, OpenFile, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen
- Parameters
playlist (MediaPlaylist) – The play list to open.
- Returns
true if the source will be opened, false otherwise.
- Return type
- open_playlist_index(playlist, index) bool ¶
Open a particular media source in the specified play list. see: Close, OpenFile, OpenPlaylist, OpenSource, OpenUrl, Reopen
- Parameters
playlist (MediaPlaylist) – The play list to open.
index (int32) – The index of the source to open.
- Returns
true if the source will be opened, false otherwise.
- Return type
- open_source(media_source) bool ¶
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! see: Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen
- Parameters
media_source (MediaSource) – The media source to open.
- Returns
true if the source will be opened, false otherwise.
- Return type
- open_source_latent(world_context_object, latent_info, media_source, options) bool ¶
Open the specified media source with options using a latent action.
A result of true indicates that the player successfully completed all requested operations. see: Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
media_source (MediaSource) – The media source to open.
options (MediaPlayerOptions) – The media player options to apply.
- Returns
success (bool): All requested operations have completed successfully.
- Return type
- open_source_with_options(media_source, options) bool ¶
Open the specified media source with supplied options applied.
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! see: Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen
- Parameters
media_source (MediaSource) – The media source to open.
options (MediaPlayerOptions) – The media player options to apply.
- Returns
true if the source will be opened, false otherwise.
- Return type
- open_url(url) bool ¶
Opens the specified media URL.
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! see: GetUrl, Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, Reopen
- pause() bool ¶
Pauses media playback.
This is the same as setting the playback rate to 0.0. see: CanPause, Close, Next, Play, Previous, Rewind, Seek
- Returns
true if playback is being paused, false otherwise.
- Return type
- play() bool ¶
Starts media playback.
This is the same as setting the playback rate to 1.0. see: CanPlay, GetRate, Next, Pause, Previous, SetRate
- Returns
true if playback is starting, false otherwise.
- Return type
- property play_on_open¶
[Read-Write] Play on Open: Automatically start playback after media opened successfully.
If disabled, listen to the OnMediaOpened Blueprint event to detect when the media finished opening, and then start playback using the Play function. see: OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Play
- Type
(bool)
- property playlist¶
[Read-Only] Playlist: The play list to use, if any.
Use the OpenPlaylist or OpenPlaylistIndex function to change this value at runtime. see: OpenPlaylist, OpenPlaylistIndex
- Type
- property playlist_index¶
[Read-Only] Playlist Index: The current index of the source in the play list being played.
Use the Previous and Next methods to change this value at runtime. see: Next, Previous
- Type
(int32)
- previous() bool ¶
Open the previous item in the current play list.
The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source. see: Close, Next, OpenUrl, OpenSource, Play, SetPlaylist
- Returns
true on success, false otherwise.
- Return type
- reopen() bool ¶
Reopens the currently opened media or play list. see: Close, Open, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl
- Returns
true if the media will be opened, false otherwise.
- Return type
- rewind() bool ¶
Rewinds the media to the beginning.
This is the same as seeking to zero time. see: GetTime, Seek
- Returns
true if rewinding, false otherwise.
- Return type
- select_track(track_type, track_index) bool ¶
Select the active track of the given type.
The selected track will use its currently active format. Active formats will be remembered on a per track basis. The first available format is active by default. To switch the track format, use SetTrackFormat instead. see: GetNumTracks, GetSelectedTrack, SetTrackFormat
- Parameters
track_type (MediaPlayerTrack) – The type of track to select.
track_index (int32) – The index of the track to select, or INDEX_NONE to deselect.
- Returns
true if the track was selected, false otherwise.
- Return type
- set_block_on_time(time) None ¶
Set the time on which to block.
If set, this player will block in TickInput or TickFetch until the video sample for the specified time are actually available.
- Parameters
time (Timespan) – The time to block on, or FTimespan::MinValue to disable.
- set_desired_player_name(player_name) None ¶
Set the name of the desired native player. see: GetDesiredPlayerName
- Parameters
player_name (Name) – The name of the player to set.
- set_media_options(options) None ¶
Sets the media options used by the player.
- Parameters
options (MediaSource) – Options to pass to the player.
- set_native_volume(volume) bool ¶
Set the volume on the native player if not mixing with Sound Wave asset.
The SetNativeVolume can be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms. see: NativeAudioOut
- set_time_delay(time_delay) None ¶
Delay of the player’s time.
This setting can be used to manually sync multiple sources. Set to 1 seconds, if you would like that Player to play 1 second behind his current time. If the value is too big, it is possible that the player would not hold that frame for that long. see: GetTimeDelay
- Parameters
time_delay (Timespan) –
- set_track_format(track_type, track_index, format_index) bool ¶
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. see: GetNumTrackFormats, GetNumTracks, GetTrackFormat, SelectTrack
- Parameters
track_type (MediaPlayerTrack) – The type of track to update.
track_index (int32) – The index of the track to update.
format_index (int32) – The index of the format to select (must be valid).
- Returns
true if the track was selected, false otherwise.
- Return type
- set_video_track_frame_rate(track_index, format_index, frame_rate) bool ¶
Set the frame rate of the specified video track. see: GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
- Parameters
track_index (int32) – The index of the track, or INDEX_NONE for the selected one.
format_index (int32) – Index of the track format, or INDEX_NONE for the selected one.
frame_rate (float) – The frame rate to set (must be in range of format’s supported frame rates).
- Returns
true on success, false otherwise.
- Return type
- set_view_field(horizontal, vertical, absolute) bool ¶
Set the field of view (only for 360 videos). see: GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation
- set_view_rotation(rotation, absolute) bool ¶
Set the view’s rotation (only for 360 videos). see: GetViewRotation, SetViewField
- property shuffle¶
[Read-Write] Shuffle: Whether playback should shuffle media sources in the play list. see: OpenPlaylist, OpenPlaylistIndex
- Type
(bool)
- supports_rate(rate, unthinned) bool ¶
Check whether the specified playback rate is supported. see: SupportsScrubbing, SupportsSeeking
- supports_scrubbing() bool ¶
Check whether the currently loaded media supports scrubbing. see: SupportsRate, SupportsSeeking
- Returns
true if scrubbing is supported, false otherwise.
- Return type