Navigation
API > API/Plugins > API/Plugins/MediaPlate
This is a component for AMediaPlate that can play and show media in the world.
| Name | UMediaPlateComponent |
| Type | class |
| Header File | /Engine/Plugins/Media/MediaPlate/Source/MediaPlate/Public/MediaPlateComponent.h |
| Include Path | #include "MediaPlateComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UMediaPlateComponent :
public UActorComponent,
public IMediaPlayerProxyInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UMediaPlateComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMediaPlateComponent
(
const FObjectInitializer& ObjectInitializer |
MediaPlateComponent.h |
Structs
| Name | Remarks |
|---|---|
| Layer | Contains all of our layers. |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MediaComponentName | FLazyName | Name for our media component. | MediaPlateComponent.h |
| MediaPlaylistName | FLazyName | Name for our playlist. | MediaPlateComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAutoPlay | bool | If set then start playing when this object is active. | MediaPlateComponent.h |
|
| bEnableAudio | bool | If set then enable audio. | MediaPlateComponent.h |
|
| bPlayOnOpen | bool | If set then play when opening the media. | MediaPlateComponent.h |
|
| CacheSettings | FMediaSourceCacheSettings | Override the default cache settings. | MediaPlateComponent.h |
|
| Letterboxes | TArray< TObjectPtr< UStaticMeshComponent > > | Holds the component for the mesh. | MediaPlateComponent.h |
|
| MediaPlateResource | FMediaPlateResource | Which media source is used to populate the media playlist | MediaPlateComponent.h |
|
| PlaylistIndex | int32 | The current index of the source in the play list being played. | MediaPlateComponent.h |
|
| SoundComponent | TObjectPtr< UMediaSoundComponent > | Holds the component to play sound. | MediaPlateComponent.h |
|
| StartTime | float | What time to start playing from (in seconds). | MediaPlateComponent.h |
|
| StaticMeshComponent | TObjectPtr< UStaticMeshComponent > | Holds the component for the mesh. | MediaPlateComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActivePlaylist | TObjectPtr< UMediaPlaylist > | Currently running Playlist. | MediaPlateComponent.h |
|
| ActualPlaybackState | EPlaybackState | MediaPlateComponent.h | ||
| bAdaptivePoleMipUpscaling | bool | If true then Media Plate will attempt to load and upscale lower quality mips and display those at the poles (Sphere object only). | MediaPlateComponent.h |
|
| bEnableMipMapUpscaling | bool | If true then enable the use of MipLevelToUpscale as defined below. | MediaPlateComponent.h |
|
| bIsAspectRatioAuto | bool | If true then set the aspect ratio automatically based on the media. | MediaPlateComponent.h |
|
| bIsMediaPlatePlaying | bool | If true, then we want the media plate to play. | MediaPlateComponent.h |
|
| bIsNormalMode | bool | True if we are in normal mode (as opposed to proxy mode). | MediaPlateComponent.h | |
| bLoop | bool | If set then loop when we reach the end. | MediaPlateComponent.h |
|
| bPlayOnlyWhenVisible | bool | If true then only allow playback when the media plate is visible. | MediaPlateComponent.h |
|
| bResumeWhenOpened | bool | True if we should resume where we left off when we open the media. | MediaPlateComponent.h | |
| bWantsToPlayWhenVisible | bool | True if our media should be playing when visible. | MediaPlateComponent.h | |
| ClockSink | TSharedPtr< FMediaComponentClockSink, ESPMode::ThreadSafe > | Our media clock sink. | MediaPlateComponent.h | |
| CurrentRate | float | Desired rate of play that we want. | MediaPlateComponent.h | |
| ExternalMediaSource | TObjectPtr< UMediaSource > | Embedded Media Source loaded from external path specified in MediaPlateResource. | MediaPlateComponent.h |
|
| IntendedPlaybackState | EPlaybackState | State transitions. | MediaPlateComponent.h | |
| LetterboxAspectRatio | float | If > 0, then this is the aspect ratio of our screen and letterboxes will be added if the media is smaller than the screen. | MediaPlateComponent.h | |
| MatNumTexPerLayer | const int32 | Number of textures we have per layer in the material. | MediaPlateComponent.h | |
| MediaPlayer | TObjectPtr< UMediaPlayer > | This component's media player | MediaPlateComponent.h |
|
| MediaTextureProxyCount | TMap< int32, int32 > | Map of TextureIndex to proxy count. | MediaPlateComponent.h | |
| MediaTextures | TArray< TObjectPtr< UMediaTexture > > | Holds the media textures. | MediaPlateComponent.h |
|
| MediaTextureSettings | FMediaTextureResourceSettings | Exposes Media Texture settings via Media Plate component. | MediaPlateComponent.h |
|
| MediaTextureTrackerObject | TSharedPtr< FMediaTextureTrackerObject, ESPMode::ThreadSafe > | Info representing this object. | MediaPlateComponent.h | |
| MeshRange | FVector2D | MediaPlateComponent.h | ||
| MipLevelToUpscale | int32 | With exr playback, upscale into lower quality mips from this specified level. | MediaPlateComponent.h |
|
| MipMapBias | float | Media texture mip map bias shared between the (image sequence) loader and the media texture sampler. | MediaPlateComponent.h |
|
| PendingPlaybackState | EPlaybackState | MediaPlateComponent.h | ||
| TextureLayers | TArray< Layer > | MediaPlateComponent.h | ||
| TimeWhenPlaybackPaused | double | Game time when we paused playback. | MediaPlateComponent.h | |
| VisibleMipsTilesCalculations | EMediaTextureVisibleMipsTiles | Visible mips and tiles calculation mode for the supported mesh types in MediaPlate. | MediaPlateComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
MediaPlateComponent.h | ||
virtual void BeginPlay() |
MediaPlateComponent.h | ||
void Close() |
Call this to close the media. | MediaPlateComponent.h |
|
virtual void EndPlay
(
const EEndPlayReason::Type InEndPlayReason |
MediaPlateComponent.h | ||
float GetAspectRatio() |
Call this to get the aspect ratio of the mesh. | MediaPlateComponent.h | |
virtual const FMediaSourceCacheSettings & GetCacheSettings() |
MediaPlateComponent.h | ||
bool GetIsAspectRatioAuto() |
Gets whether automatic aspect ratio is enabled. | MediaPlateComponent.h |
|
float GetLetterboxAspectRatio() |
Call this to get the aspect ratio of the screen. | MediaPlateComponent.h |
|
bool GetLoop() |
Call this to see if we want to loop. | MediaPlateComponent.h |
|
UMediaPlayer * GetMediaPlayer() |
Call this get our media player. | MediaPlateComponent.h |
|
UMediaPlaylist * GetMediaPlaylist() |
Get the currently active Media Playlist | MediaPlateComponent.h |
|
UMediaTexture * GetMediaTexture
(
int32 Index |
Call this get our media texture. | MediaPlateComponent.h |
|
FVector2D GetMeshRange() |
Return the arc size in degrees used for visible mips and tiles calculations, specific to the sphere. | MediaPlateComponent.h |
|
virtual float GetProxyRate() |
MediaPlateComponent.h | ||
UMediaSource * GetSelectedMediaSource() |
Get the currently active Media Source. | MediaPlateComponent.h |
|
EMediaTextureVisibleMipsTiles GetVisibleMipsTilesCalculations() |
Call this to get the mip tile calculations mesh mode. | MediaPlateComponent.h | |
bool GetWantsToPlayWhenVisible() |
Call this to see if this plate wants to play when it becomes visible. | MediaPlateComponent.h | |
bool IsEventStateChangeAllowed
(
EMediaPlateEventState InRequestEventState |
Indicates if switching to the given event state (open, play, etc) is currently allowed by the backend. | MediaPlateComponent.h |
|
virtual bool IsExternalControlAllowed() |
MediaPlateComponent.h | ||
bool IsMediaPlatePlaying() |
Call this to see if the media plate is playing. | MediaPlateComponent.h |
|
bool Next() |
Play the next item in the playlist.returns True if it played something. | MediaPlateComponent.h |
|
virtual void OnComponentDestroyed
(
bool bDestroyingHierarchy |
MediaPlateComponent.h | ||
virtual void OnRegister() |
MediaPlateComponent.h | ||
virtual void OnUnregister() |
MediaPlateComponent.h | ||
void Open() |
Call this to open the media. | MediaPlateComponent.h |
|
void OpenLatent
(
const UObject* InWorldContextObject, |
Open the media using a latent action. | MediaPlateComponent.h |
|
void Pause() |
Call this to pause playback. Play can be called to resume playback. | MediaPlateComponent.h |
|
void Play() |
Call this to start playing. Open must be called before this. | MediaPlateComponent.h |
|
virtual void PostEditChangeChainProperty
(
FPropertyChangedChainEvent& InPropertyChangedEvent |
MediaPlateComponent.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
MediaPlateComponent.h | ||
virtual void PostEditUndo() |
MediaPlateComponent.h | ||
virtual void PostLoad() |
MediaPlateComponent.h | ||
bool Previous() |
Play the previous item in the playlist.returns True if it played something. | MediaPlateComponent.h |
|
virtual UMediaSource * ProxyGetMediaSourceFromIndex
(
int32 Index |
MediaPlateComponent.h | ||
virtual UMediaTexture * ProxyGetMediaTexture
(
int32 LayerIndex, |
MediaPlateComponent.h | ||
virtual void ProxyReleaseMediaTexture
(
int32 LayerIndex, |
MediaPlateComponent.h | ||
virtual bool ProxySetAspectRatio
(
UMediaPlayer* InMediaPlayer |
MediaPlateComponent.h | ||
virtual void ProxySetTextureBlend
(
int32 LayerIndex, |
MediaPlateComponent.h | ||
bool Rewind() |
Rewinds the media to the beginning.This is the same as seeking to zero time. | MediaPlateComponent.h |
|
bool Seek
(
const FTimespan& Time |
Call this to seek to the specified playback time. | MediaPlateComponent.h |
|
void SelectExternalMedia
(
const FString& InFilePath |
Select the external media file (non-UE asset) to be opened. | MediaPlateComponent.h |
|
void SelectMediaPlaylistAsset
(
const UMediaPlaylist* InMediaPlaylist |
Select the media playlist asset to be opened. | MediaPlateComponent.h |
|
void SelectMediaSourceAsset
(
const UMediaSource* InMediaSource |
Select the media source asset to be opened. | MediaPlateComponent.h |
|
void SetAspectRatio
(
float AspectRatio |
Call this to set the aspect ratio of the mesh. | MediaPlateComponent.h | |
void SetEnableAudio
(
bool bInEnableAudio |
MediaPlateComponent.h |
|
|
void SetIsAspectRatioAuto
(
bool bInIsAspectRatioAuto |
Sets whether automatic aspect ratio is enabled. | MediaPlateComponent.h |
|
void SetLetterboxAspectRatio
(
float AspectRatio |
Call this to set the aspect ratio of the screen. | MediaPlateComponent.h |
|
void SetLoop
(
bool bInLoop |
Call this enable/disable looping. | MediaPlateComponent.h |
|
void SetMediaPlateResource
(
const FMediaPlateResource& InMediaPlayerResource |
Update Media Player Resource. This will also refresh Playlist accordingly. | MediaPlateComponent.h | |
void SetMeshRange
(
FVector2D InMeshRange |
Set the arc size in degrees used for visible mips and tiles calculations, specific to the sphere. | MediaPlateComponent.h |
|
void SetNumberOfTextures
(
int32 NumTextures |
Called from AMediaPlate to set how many media textures the material needs. | MediaPlateComponent.h | |
void SetPlayOnlyWhenVisible
(
bool bInPlayOnlyWhenVisible |
Call this to set bPlayOnlyWhenVisible. | MediaPlateComponent.h |
|
virtual bool SetProxyRate
(
float Rate |
MediaPlateComponent.h | ||
void SetVisibleMipsTilesCalculations
(
EMediaTextureVisibleMipsTiles InVisibleMipsTilesCalculations |
Call this to set the mip tile calculations mesh mode. (Note: restarts playback to apply changes.) | MediaPlateComponent.h | |
void SwitchStates
(
EMediaPlateEventState State |
Called whenever a button was pressed locally or on a remote endpoint. | MediaPlateComponent.h | |
virtual void TickComponent
(
float DeltaTime, |
MediaPlateComponent.h | ||
void TickOutput() |
Called from the media clock. | MediaPlateComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static float GetForwardRate
(
UMediaPlayer* MediaPlayer |
Get the rate to use when we press the forward button. | MediaPlateComponent.h | |
static float GetReverseRate
(
UMediaPlayer* MediaPlayer |
Get the rate to use when we press the reverse button. | MediaPlateComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MediaPlaylist_DEPRECATED | TObjectPtr< UMediaPlaylist > | MediaPlateComponent.h |
|