Navigation
API > API/Plugins > API/Plugins/MediaPlate
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UMediaPlateComponent
References
| Module | MediaPlate |
| Header | /Engine/Plugins/Media/MediaPlate/Source/MediaPlate/Public/MediaPlateComponent.h |
| Include | #include "MediaPlateComponent.h" |
Syntax
UCLASS&40;&41;
class UMediaPlateComponent :
public UActorComponent,
public IMediaPlayerProxyInterface
Remarks
This is a component for AMediaPlate that can play and show media in the world.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAutoPlay | If set then start playing when this object is active. | |
| bool | bEnableAudio | If set then enable audio. | |
| bool | bPlayOnOpen | If set then play when opening the media. | |
| FMediaSourceCacheSettings | CacheSettings | Override the default cache settings. | |
| TArray< TObjectPtr< UStaticMeshComponent > > | Letterboxes | Holds the component for the mesh. | |
| TObjectPtr< UMediaPlaylist > | MediaPlaylist | What media playlist to play. | |
| int32 | PlaylistIndex | The current index of the source in the play list being played. | |
| TObjectPtr< UMediaSoundComponent > | SoundComponent | Holds the component to play sound. | |
| float | StartTime | What time to start playing from (in seconds). | |
| TObjectPtr< UStaticMeshComponent > | StaticMeshComponent | Holds the component for the mesh. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UMediaPlateComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Close () |
Call this to close the media. | |
| float | Call this to get the aspect ratio of the mesh. | ||
| float | GetForwardRate
(
UMediaPlayer* MediaPlayer |
Get the rate to use when we press the forward button. | |
| bool | Gets whether automatic aspect ratio is enabled. | ||
| float | Call this to get the aspect ratio of the screen. | ||
| bool | GetLoop () |
Call this to see if we want to loop. | |
| UMediaPlayer * | Call this get our media player. | ||
| UMediaTexture * | GetMediaTexture
(
int32 Index |
Call this get our media texture. | |
| FVector2D | GetMeshRange () |
Return the arc size in degrees used for visible mips and tiles calculations, specific to the sphere. | |
| float | GetReverseRate
(
UMediaPlayer* MediaPlayer |
Get the rate to use when we press the reverse button. | |
| EMediaTextureVisibleMipsTiles | Call this to get the mip tile calculations mesh mode. | ||
| bool | Call this to see if this plate wants to play when it becomes visible. | ||
| bool | Call this to see if the media plate is playing. | ||
| bool | Next () |
Play the next item in the playlist.returns True if it played something. | |
| void | Open () |
Call this to open the media. | |
| void | Pause () |
Call this to pause playback. Play can be called to resume playback. | |
| void | Play () |
Call this to start playing. Open must be called before this. | |
| bool | Previous () |
Play the previous item in the playlist.returns True if it played something. | |
| bool | Rewind () |
Rewinds the media to the beginning.This is the same as seeking to zero time. | |
| bool | Call this to seek to the specified playback time. | ||
| void | SetAspectRatio
(
float AspectRatio |
Call this to set the aspect ratio of the mesh. | |
| void | SetIsAspectRatioAuto
(
bool bInIsAspectRatioAuto |
Sets whether automatic aspect ratio is enabled. | |
| void | SetLetterboxAspectRatio
(
float AspectRatio |
Call this to set the aspect ratio of the screen. | |
| void | SetLoop
(
bool bInLoop |
Call this enable/disable looping. | |
| void | SetMeshRange
(
FVector2D InMeshRange |
Set the arc size in degrees used for visible mips and tiles calculations, specific to the sphere. | |
| void | SetNumberOfTextures
(
int32 NumTextures |
Called from AMediaPlate to set how many media textures the material needs. | |
| void | SetPlayOnlyWhenVisible
(
bool bInPlayOnlyWhenVisible |
Call this to set bPlayOnlyWhenVisible. | |
| void | SetVisibleMipsTilesCalculations
(
EMediaTextureVisibleMipsTiles InVisibleMipsTilesCalculations |
Call this to set the mip tile calculations mesh mode. (Note: restarts playback to apply changes.) | |
| void | SwitchStates
(
EMediaPlateEventState State |
Called whenever a button was pressed locally or on a remote endpoint. | |
| void | TickOutput () |
Called from the media clock. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlay () |
Begins Play for the component. | |
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. | |
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Overridden from IMediaPlayerProxyInterface
| Type | Name | Description | |
|---|---|---|---|
| const FMediaSourceCacheSettings & | Gets the cache settings for the player. | ||
| float | GetProxyRate () |
Get the desired playback rate. | |
| bool | Call this to see if you can control the media player, or if the owning object is using it. | ||
| UMediaSource * | ProxyGetMediaSourceFromIndex
(
int32 Index |
Get the media source for a given index. | |
| UMediaTexture * | ProxyGetMediaTexture
(
int32 LayerIndex, |
Get a media texture that we can assign a media player to. | |
| void | ProxyReleaseMediaTexture
(
int32 LayerIndex, |
Release a media texture that was retrieved from ProxyGetMediaTexture. | |
| bool | ProxySetAspectRatio
(
UMediaPlayer* InMediaPlayer |
Sets the aspect ratio of the proxy based on what the media player is playing. | |
| void | ProxySetTextureBlend
(
int32 LayerIndex, |
Set the blend value for a texture that was retrieved from ProxyGetMediaTexture. | |
| bool | SetProxyRate
(
float Rate |
Changes the desired playback rate. |
Constants
| Name | Description |
|---|---|
| MediaComponentName | Name for our media component. |
| MediaPlaylistName | Name for our playlist. |