unreal.MediaStreamLocalPlayer¶
- class unreal.MediaStreamLocalPlayer(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ObjectMedia Stream Local Player. Plays a media source using a UMediaPlayer.
C++ Source:
Plugin: MediaStream
Module: MediaStream
File: MediaStreamLocalPlayer.h
Editor Properties: (see get_editor_property/set_editor_property)
media_texture(MediaTexture): [Read-Only]playback_state(MediaStreamPlaybackState): [Read-Write]player(MediaPlayer): [Read-Write]player_config(MediaStreamPlayerConfig): [Read-Write]playlist_index(int32): [Read-Write] The index playing in the playlist. -1 to ignore.requested_seek_frame(int32): [Read-Write] Attempts to seek to this frame. Any value below 0 is ignored.texture_config(MediaStreamTextureConfig): [Read-Write]
- apply_player_config() None¶
Applies the current player config to the current media player. This is generally automatic.
- apply_texture_config() None¶
Applies the current texture config to the current media texture. This is generally automatic.
- bp_set_playback_state(state) None¶
BP Set Playback State
- Parameters:
state (MediaStreamPlaybackState)
- bp_set_requested_seek_frame(seek_frame) None¶
BP Set Requested Seek Frame
- Parameters:
seek_frame (int32)
- bp_set_requested_seek_time(seek_time) None¶
BP Set Requested Seek Time
- Parameters:
seek_time (float)
- fast_forward() bool¶
Seeks to the end of the current media.
- Returns:
True if successful.
- Return type:
- get_media_stream() MediaStream¶
Get Media Stream
- Return type:
- get_media_texture() MediaTexture¶
- Returns:
Gets the media texture subobject.
- Return type:
- get_playback_state() MediaStreamPlaybackState¶
- Returns:
Gets the media player playback state.
- Return type:
- get_player() MediaPlayer¶
- Returns:
The active player, if there is one and it is valid.
- Return type:
- get_player_config() MediaStreamPlayerConfig¶
- Returns:
The current player config.
- Return type:
- get_playlist_index() int32¶
- Returns:
Gets the active playlist index. May not match the actual player. -1 on error.
- Return type:
int32
- get_playlist_num() int32¶
- Returns:
The size of the current playlist. -1 on error.
- Return type:
int32
- get_requested_seek_frame() int32¶
- Returns:
The frame offset in the media that has been requested.
- Return type:
int32
- get_requested_seek_time() float¶
- Returns:
The time offset in the media that has been requested.
- Return type:
- get_source_stream() MediaStream¶
- Returns:
For proxy streams, returns the stream this is getting data from.
- Return type:
- get_texture_config() MediaStreamTextureConfig¶
- Returns:
The current texture config.
- Return type:
- property media_texture: MediaTexture¶
[Read-Only]
- Type:
- next() bool¶
Goes to the next item in the playlist. Only possible with playlist sources.
- Returns:
True if successful.
- Return type:
- open_source() bool¶
Opens the source if it is not already opened.
- Returns:
True if successful.
- Return type:
- property playback_state: MediaStreamPlaybackState¶
[Read-Write]
- Type:
- property player: MediaPlayer¶
[Read-Only]
- Type:
- property player_config: MediaStreamPlayerConfig¶
[Read-Write]
- Type:
- property playlist_index: int¶
[Read-Write] The index playing in the playlist. -1 to ignore.
- Type:
(int32)
- previous() bool¶
Goes to the previous item in the playlist. Only possible with playlist sources.
- Returns:
True if successful.
- Return type:
- property requested_seek_frame: int¶
[Read-Write] Attempts to seek to this frame. Any value below 0 is ignored.
- Type:
(int32)
- set_playback_state(state) bool¶
Sets the media player playback state.
- Parameters:
state (MediaStreamPlaybackState) – The state to change to.
- Returns:
True on success. False on failure or invalid player.
- Return type:
- set_player_config(player_config) None¶
Update the current player’s (and any newly set player’s) config.
- Parameters:
player_config (MediaStreamPlayerConfig) – The new config.
- set_playlist_index(index) bool¶
Setter for events.
- Parameters:
index (int32) – The index to start playing.
- Returns:
True on success. False on failure or invalid player.
- Return type:
- set_requested_seek_frame(frame) bool¶
Sets the frame in the currently playing player, if possible.
- Parameters:
frame (int32) – The frame offset in the media to request.
- Returns:
True on success. False on failure or invalid player.
- Return type:
- set_texture_config(texture_config) None¶
Update the current texture’s (and any newly set texture’s) config.
- Parameters:
texture_config (MediaStreamTextureConfig) – The new config.
- property texture_config: MediaStreamTextureConfig¶
[Read-Write]
- Type: