unreal.MediaPlateComponent

class unreal.MediaPlateComponent(outer: Optional[Object] = None, name: Union[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)

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

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

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

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

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

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

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

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

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

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

  • is_media_plate_playing (bool): [Read-Write] Is Media Plate Playing: 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] Letterboxes: Holds the component for the mesh.

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

  • media_playlist (MediaPlaylist): [Read-Write] Media Playlist: What media playlist to play.

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

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

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

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

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

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

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

  • replicate_using_registered_sub_object_list (bool): [Read-Write] Replicate Using Registered Sub Object List: 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] Replicates: Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

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

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

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

  • visible_mips_tiles_calculations (MediaTextureVisibleMipsTiles): [Read-Write] Visible Mips Tiles Calculations: 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_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_texture() MediaTexture

Call this get our media texture.

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

property is_aspect_ratio_auto: bool

[Read-Write] Is Aspect Ratio Auto: If true then set the aspect ratio automatically based on the media.

Type:

(bool)

property is_media_plate_playing: bool

[Read-Only] Is Media Plate Playing: 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] Loop: If set then loop when we reach the end.

Type:

(bool)

property media_playlist: MediaPlaylist

[Read-Write] Media Playlist: What media playlist to play.

Type:

(MediaPlaylist)

open() None

Call this to open the media.

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] Play on Open: If set then play when opening the media.

Type:

(bool)

property play_only_when_visible: bool

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

Type:

(bool)

property playlist_index: int

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

Type:

(int32)

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

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] Start Time: What time to start playing from (in seconds).

Type:

(float)