unreal.MediaPlateComponent

class unreal.MediaPlateComponent(outer: Object | None = None, name: Name | str = 'None')

Bases: ActorComponent

This is a component for AMediaPlate that can play and show media in the world.

C++ Source:

  • Plugin: MediaPlate

  • Module: MediaPlate

  • File: MediaPlateComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • adaptive_pole_mip_upscaling (bool): [Read-Write] If true then Media Plate will attempt to load and upscale lower quality mips and display those at the poles (Sphere object only).

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • auto_play (bool): [Read-Write] If set then start playing when this object is active.

  • cache_settings (MediaSourceCacheSettings): [Read-Write] Override the default cache settings.

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • enable_audio (bool): [Read-Write] If set then enable audio.

  • enable_mip_map_upscaling (bool): [Read-Write] If true then enable the use of MipLevelToUpscale as defined below.

  • is_aspect_ratio_auto (bool): [Read-Write] If true then set the aspect ratio automatically based on the media.

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • is_media_plate_playing (bool): [Read-Write] If true, then we want the media plate to play. Note that this could be true, but the player is not actually playing because bPlayOnlyWhenVisible = true and the plate is not visible.

  • letterboxes (Array[StaticMeshComponent]): [Read-Write] Holds the component for the mesh.

  • loop (bool): [Read-Write] If set then loop when we reach the end.

  • media_plate_resource (MediaPlateResource): [Read-Write] Which media source is used to populate the media playlist

  • media_playlist (MediaPlaylist): [Read-Write] deprecated: Use MediaPlateResource instead

  • media_texture_settings (MediaTextureResourceSettings): [Read-Write] Exposes Media Texture settings via Media Plate component.

  • mip_level_to_upscale (int32): [Read-Write] With exr playback, upscale into lower quality mips from this specified level. All levels including and above the specified value will be fully read.

  • mip_map_bias (float): [Read-Write] Media texture mip map bias shared between the (image sequence) loader and the media texture sampler.

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • play_on_open (bool): [Read-Write] If set then play when opening the media.

  • play_only_when_visible (bool): [Read-Write] If true then only allow playback when the media plate is visible.

  • playlist_index (int32): [Read-Write] The current index of the source in the play list being played.

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicate_using_registered_sub_object_list (bool): [Read-Write] When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

  • sound_component (MediaSoundComponent): [Read-Write] Holds the component to play sound.

  • start_time (float): [Read-Write] What time to start playing from (in seconds).

  • static_mesh_component (StaticMeshComponent): [Read-Write] Holds the component for the mesh.

  • visible_mips_tiles_calculations (MediaTextureVisibleMipsTiles): [Read-Write] Visible mips and tiles calculation mode for the supported mesh types in MediaPlate. (Player restart on change.)

close() None

Call this to close the media.

get_is_aspect_ratio_auto() bool

Gets whether automatic aspect ratio is enabled.

Return type:

bool

get_letterbox_aspect_ratio() float

Call this to get the aspect ratio of the screen.

Return type:

float

get_media_player() MediaPlayer

Call this get our media player.

Return type:

MediaPlayer

get_media_playlist() MediaPlaylist

Get the currently active Media Playlist

Return type:

MediaPlaylist

get_media_texture(index=0) MediaTexture

Call this get our media texture.

Parameters:

index (int32)

Return type:

MediaTexture

get_mesh_range() Vector2D

Return the arc size in degrees used for visible mips and tiles calculations, specific to the sphere.

Return type:

Vector2D

get_selected_media_source() MediaSource

Get the currently active Media Source.

Return type:

MediaSource

property is_aspect_ratio_auto: bool

[Read-Write] If true then set the aspect ratio automatically based on the media.

Type:

(bool)

is_event_state_change_allowed(request_event_state) bool

Indicates if switching to the given event state (open, play, etc) is currently allowed by the backend.

Parameters:

request_event_state (MediaPlateEventState) – Requested event state to switch to (Open, Play, etc)

Returns:

true if the state switch is allowed, false otherwise.

Return type:

bool

property is_media_plate_playing: bool

[Read-Only] If true, then we want the media plate to play. Note that this could be true, but the player is not actually playing because bPlayOnlyWhenVisible = true and the plate is not visible.

Type:

(bool)

property loop: bool

[Read-Write] If set then loop when we reach the end.

Type:

(bool)

property media_plate_resource: MediaPlateResource

[Read-Write] Which media source is used to populate the media playlist

Type:

(MediaPlateResource)

property media_playlist: MediaPlaylist

[Read-Write] deprecated: Use MediaPlateResource instead

Type:

(MediaPlaylist)

next() bool

Play the next item in the playlist.

returns True if it played something.

Return type:

bool

open() None

Call this to open the media.

open_latent(world_context_object, latent_info, timeout=10.000000, wait_for_texture=True) bool

Open the media using a latent action.

Parameters:
  • world_context_object (Object)

  • latent_info (LatentActionInfo)

  • timeout (float) – Wait timeout in seconds

  • wait_for_texture (bool) – Wait for the media texture to have rendered a sample.

Returns:

out_success (bool): The media was opened successfully.

Return type:

bool

pause() None

Call this to pause playback. Play can be called to resume playback.

play() None

Call this to start playing. Open must be called before this.

property play_on_open: bool

[Read-Write] If set then play when opening the media.

Type:

(bool)

property play_only_when_visible: bool

[Read-Only] If true then only allow playback when the media plate is visible.

Type:

(bool)

property playlist_index: int

[Read-Write] The current index of the source in the play list being played.

Type:

(int32)

previous() bool

Play the previous item in the playlist.

returns True if it played something.

Return type:

bool

rewind() bool

Rewinds the media to the beginning.

This is the same as seeking to zero time.

Returns:

True if rewinding, false otherwise.

Return type:

bool

seek(time) bool

Call this to seek to the specified playback time.

Parameters:

time (Timespan) – Time to seek to.

Returns:

True on success, false otherwise.

Return type:

bool

select_external_media(file_path) None

brief: Select the external media file (non-UE asset) to be opened.

Parameters:

file_path (str) – non-UFS path (absolute or relative to executable) to the media file.

select_media_playlist_asset(media_playlist) None

brief: Select the media playlist asset to be opened.

Parameters:

media_playlist (MediaPlaylist) – media playlist asset to open.

select_media_source_asset(media_source) None

brief: Select the media source asset to be opened.

Parameters:

media_source (MediaSource) – media source asset to open.

set_enable_audio(enable_audio) None

Set Enable Audio

Parameters:

enable_audio (bool)

set_is_aspect_ratio_auto(is_aspect_ratio_auto) None

Sets whether automatic aspect ratio is enabled.

Parameters:

is_aspect_ratio_auto (bool)

set_letterbox_aspect_ratio(aspect_ratio) None

Call this to set the aspect ratio of the screen.

Parameters:

aspect_ratio (float)

set_mesh_range(mesh_range) None

Set the arc size in degrees used for visible mips and tiles calculations, specific to the sphere.

Parameters:

mesh_range (Vector2D)

set_play_only_when_visible(play_only_when_visible) None

Call this to set bPlayOnlyWhenVisible.

Parameters:

play_only_when_visible (bool)

property start_time: float

[Read-Write] What time to start playing from (in seconds).

Type:

(float)