Class MediaPlayer
Implements a media player asset that can play movies and other media sources.
Inherited Members
Namespace: UE4.MediaAssets
Assembly: UE4DotNet.dll
Syntax
public class MediaPlayer : UObject
Properties
| Improve this Doc View SourceAffectedByPIEHandling
Declaration
public bool AffectedByPIEHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CacheAhead
Duration of samples to cache ahead of the play head.
Declaration
public Timespan CacheAhead { get; set; }
Property Value
Type | Description |
---|---|
Timespan |
Remarks
@see CacheBehind, CacheBehindGame
CacheBehind
Duration of samples to cache behind the play head (when not running as game).
Declaration
public Timespan CacheBehind { get; set; }
Property Value
Type | Description |
---|---|
Timespan |
Remarks
@see CacheAhead, CacheBehindGame
CacheBehindGame
Duration of samples to cache behind the play head (when running as game).
Declaration
public Timespan CacheBehindGame { get; set; }
Property Value
Type | Description |
---|---|
Timespan |
Remarks
@see CacheAhead, CacheBehind
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static MediaPlayer DefaultObject { get; }
Property Value
Type | Description |
---|---|
MediaPlayer |
HorizontalFieldOfView
The initial horizontal field of view (in Euler degrees; default = 90).
Declaration
public float HorizontalFieldOfView { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function.
@see GetHorizontalFieldOfView, SetHorizontalFieldOfView, VerticalFieldOfView, ViewRotation
Loop
Declaration
public bool Loop { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
NativeAudioOut
Declaration
public bool NativeAudioOut { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PlayerGuid
The player's globally unique identifier.
Declaration
public FGuid PlayerGuid { get; set; }
Property Value
Type | Description |
---|---|
FGuid |
Playlist
The play list to use, if any.
Declaration
public MediaPlaylist Playlist { get; }
Property Value
Type | Description |
---|---|
MediaPlaylist |
Remarks
Use the OpenPlaylist or OpenPlaylistIndex function to change this value at runtime.
@see OpenPlaylist, OpenPlaylistIndex
PlaylistIndex
The current index of the source in the play list being played.
Declaration
public int PlaylistIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Use the Previous and Next methods to change this value at runtime.
@see Next, Previous
PlayOnOpen
Declaration
public bool PlayOnOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Shuffle
Declaration
public bool Shuffle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
TimeDelay
Delay of the player's time.
Declaration
public Timespan TimeDelay { get; }
Property Value
Type | Description |
---|---|
Timespan |
Remarks
@see SetTimeDelay, GetTimeDelay
VerticalFieldOfView
The initial vertical field of view (in Euler degrees; default = 60).
Declaration
public float VerticalFieldOfView { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function.
Please note that some 360 video players may be able to change only the horizontal field of view, and this setting may be ignored.
@see GetVerticalFieldOfView, SetVerticalFieldOfView, HorizontalFieldOfView, ViewRotation
ViewRotation
The initial view rotation.
Declaration
public Rotator ViewRotation { get; set; }
Property Value
Type | Description |
---|---|
Rotator |
Remarks
This setting is used only for 360 videos. It determines the rotation of the video's view. To modify the view orientation at runtime in Blueprints, use the GetViewRotation and SetViewRotation functions.
Please note that not all players may support video view rotations.
@see GetViewRotation, SetViewRotation, HorizontalFieldOfView, VerticalFieldOfView
Methods
| Improve this Doc View SourceCanPause()
Check whether media playback can be paused right now.
Declaration
public bool CanPause()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Playback can be paused if the media supports pausing and if it is currently playing.
@return true if pausing playback can be paused, false otherwise. @see CanPlay, Pause
CanPlaySource(MediaSource)
Check whether the specified media source can be played by this player.
Declaration
public bool CanPlaySource(MediaSource MediaSource)
Parameters
Type | Name | Description |
---|---|---|
MediaSource | MediaSource |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
If a desired player name is set for this player, it will only check whether that particular player type can play the specified source.
@param MediaSource The media source to check. @return true if the media source can be opened, false otherwise. @see CanPlayUrl, SetDesiredPlayerName
CanPlayUrl(String)
Check whether the specified URL can be played by this player.
Declaration
public bool CanPlayUrl(string Url)
Parameters
Type | Name | Description |
---|---|---|
System.String | Url |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
If a desired player name is set for this player, it will only check whether that particular player type can play the specified URL.
@param Url The URL to check. @see CanPlaySource, SetDesiredPlayerName
Close()
Close the currently open media, if any.
Declaration
public void Close()
Remarks
@see OnMediaClosed, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Pause, Play
GetAudioTrackChannels(Int32, Int32)
Get the number of channels in the specified audio track.
Declaration
public int GetAudioTrackChannels(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackIndex Index of the audio track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Number of channels. @see GetAudioTrackSampleRate, GetAudioTrackType
GetAudioTrackSampleRate(Int32, Int32)
Get the sample rate of the specified audio track.
Declaration
public int GetAudioTrackSampleRate(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackIndex Index of the audio track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Samples per second. @see GetAudioTrackChannels, GetAudioTrackType
GetAudioTrackType(Int32, Int32)
Get the type of the specified audio track format.
Declaration
public string GetAudioTrackType(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.String |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Audio format type string. @see GetAudioTrackSampleRate, GetAudioTrackSampleRate
GetDesiredPlayerName()
Get the name of the current desired native player.
Declaration
public Name GetDesiredPlayerName()
Returns
Type | Description |
---|---|
Name |
Remarks
@return The name of the desired player, or NAME_None if not set. @see SetDesiredPlayerName
GetDuration()
Get the media's duration.
Declaration
public Timespan GetDuration()
Returns
Type | Description |
---|---|
Timespan |
Remarks
@return A time span representing the duration. @see GetTime, Seek
GetHorizontalFieldOfView()
Get the current horizontal field of view (only for 360 videos).
Declaration
public float GetHorizontalFieldOfView()
Returns
Type | Description |
---|---|
System.Single |
Remarks
@return Horizontal field of view (in Euler degrees). @see GetVerticalFieldOfView, GetViewRotation, SetHorizontalFieldOfView
GetMediaName()
Get the human readable name of the currently loaded media source.
Declaration
public byte GetMediaName()
Returns
Type | Description |
---|---|
System.Byte |
Remarks
@return Media source name, or empty text if no media is opened @see GetPlayerName, GetUrl
GetNumTrackFormats(EMediaPlayerTrack, Int32)
Get the number of formats of the specified track.
Declaration
public int GetNumTrackFormats(EMediaPlayerTrack TrackType, int TrackIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackType The type of media tracks. @param TrackIndex The index of the track. @return Number of formats. @see GetNumTracks, GetSelectedTrack, SelectTrack
GetNumTracks(EMediaPlayerTrack)
Get the number of tracks of the given type.
Declaration
public int GetNumTracks(EMediaPlayerTrack TrackType)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackType The type of media tracks. @return Number of tracks. @see GetNumTrackFormats, GetSelectedTrack, SelectTrack
GetPlayerName()
Get the name of the current native media player.
Declaration
public Name GetPlayerName()
Returns
Type | Description |
---|---|
Name |
Remarks
@return Player name, or NAME_None if not available. @see GetMediaName
GetPlaylist()
Get the current play list.
Declaration
public MediaPlaylist GetPlaylist()
Returns
Type | Description |
---|---|
MediaPlaylist |
Remarks
Media players always have a valid play list. In C++ code you can use the GetPlaylistRef to get a reference instead of a pointer to it.
@return The play list. @see GetPlaylistIndex, GetPlaylistRef
GetPlaylistIndex()
Get the current play list index.
Declaration
public int GetPlaylistIndex()
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@return Play list index. @see GetPlaylist
GetRate()
Get the media's current playback rate.
Declaration
public float GetRate()
Returns
Type | Description |
---|---|
System.Single |
Remarks
@return The playback rate. @see SetRate, SupportsRate
GetSelectedTrack(EMediaPlayerTrack)
Get the index of the currently selected track of the given type.
Declaration
public int GetSelectedTrack(EMediaPlayerTrack TrackType)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackType The type of track to get. @return The index of the selected track, or INDEX_NONE if no track is active. @see GetNumTracks, GetTrackFormat, SelectTrack
GetSupportedRates(Boolean)
Get the supported playback rates.
Declaration
public IReadOnlyCollection<FloatRange> GetSupportedRates(bool Unthinned)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | Unthinned |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<FloatRange> |
Remarks
@param Unthinned Whether the rates are for unthinned playback. @param Will contain the the ranges of supported rates. @see SetRate, SupportsRate
GetTime()
Get the media's current playback time.
Declaration
public Timespan GetTime()
Returns
Type | Description |
---|---|
Timespan |
Remarks
@return Playback time. @see GetDuration, Seek
GetTimeDelay()
Delay of the player's time.
Declaration
public Timespan GetTimeDelay()
Returns
Type | Description |
---|---|
Timespan |
Remarks
@return Delay added to the player's time used to manually sync multiple sources. @see SetTimeDelay
GetTrackDisplayName(EMediaPlayerTrack, Int32)
Get the human readable name of the specified track.
Declaration
public byte GetTrackDisplayName(EMediaPlayerTrack TrackType, int TrackIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex |
Returns
Type | Description |
---|---|
System.Byte |
Remarks
@param TrackType The type of track. @param TrackIndex The index of the track, or INDEX_NONE for the selected one. @return Display name. @see GetNumTracks, GetTrackLanguage
GetTrackFormat(EMediaPlayerTrack, Int32)
Get the index of the active format of the specified track type.
Declaration
public int GetTrackFormat(EMediaPlayerTrack TrackType, int TrackIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
@param TrackType The type of track. @param TrackIndex The index of the track, or INDEX_NONE for the selected one. @return The index of the selected format. @see GetNumTrackFormats, GetSelectedTrack, SetTrackFormat
GetTrackLanguage(EMediaPlayerTrack, Int32)
Get the language tag of the specified track.
Declaration
public string GetTrackLanguage(EMediaPlayerTrack TrackType, int TrackIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex |
Returns
Type | Description |
---|---|
System.String |
Remarks
@param TrackType The type of track. @param TrackIndex The index of the track, or INDEX_NONE for the selected one. @return Language tag, i.e. "en-US" for English, or "und" for undefined. @see GetNumTracks, GetTrackDisplayName
GetUrl()
Get the URL of the currently loaded media, if any.
Declaration
public string GetUrl()
Returns
Type | Description |
---|---|
System.String |
Remarks
@return Media URL, or empty string if no media was loaded. @see OpenUrl
GetVerticalFieldOfView()
Get the current vertical field of view (only for 360 videos).
Declaration
public float GetVerticalFieldOfView()
Returns
Type | Description |
---|---|
System.Single |
Remarks
@return Vertical field of view (in Euler degrees), or 0.0 if not available. @see GetHorizontalFieldOfView, GetViewRotation, SetVerticalFieldOfView
GetVideoTrackAspectRatio(Int32, Int32)
Get the aspect ratio of the specified video track.
Declaration
public float GetVideoTrackAspectRatio(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.Single |
Remarks
@param TrackIndex Index of the video track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Aspect ratio. @see GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
GetVideoTrackDimensions(Int32, Int32)
Get the current dimensions of the specified video track.
Declaration
public IntPoint GetVideoTrackDimensions(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
IntPoint |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Video dimensions (in pixels). @see GetVideoTrackAspectRatio, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
GetVideoTrackFrameRate(Int32, Int32)
Get the frame rate of the specified video track.
Declaration
public float GetVideoTrackFrameRate(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.Single |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Frame rate (in frames per second). @see GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRates, GetVideoTrackType, SetVideoTrackFrameRate
GetVideoTrackFrameRates(Int32, Int32)
Get the supported range of frame rates of the specified video track.
Declaration
public FloatRange GetVideoTrackFrameRates(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
FloatRange |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Frame rate range (in frames per second). @see GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackType
GetVideoTrackType(Int32, Int32)
Get the type of the specified video track format.
Declaration
public string GetVideoTrackType(int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.String |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @return Video format type string. @see GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates
GetViewRotation()
Get the current view rotation (only for 360 videos).
Declaration
public Rotator GetViewRotation()
Returns
Type | Description |
---|---|
Rotator |
Remarks
@return View rotation, or zero rotator if not available. @see GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation
HasError()
Check whether the player is in an error state.
Declaration
public bool HasError()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
When the player is in an error state, no further operations are possible. The current media must be closed, and a new media source must be opened before the player can be used again. Errors are usually caused by faulty media files or interrupted network connections.
@see IsReady
IsBuffering()
Check whether playback is buffering data.
Declaration
public bool IsBuffering()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if looping, false otherwise. @see IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady
IsConnecting()
Check whether the player is currently connecting to a media source.
Declaration
public bool IsConnecting()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if connecting, false otherwise. @see IsBuffering, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady
IsLooping()
Check whether playback is looping.
Declaration
public bool IsLooping()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if looping, false otherwise. @see IsBuffering, IsConnecting, IsPaused, IsPlaying, IsPreparing, IsReady, SetLooping
IsPaused()
Check whether playback is currently paused.
Declaration
public bool IsPaused()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if playback is paused, false otherwise. @see CanPause, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Pause
IsPlaying()
Check whether playback has started.
Declaration
public bool IsPlaying()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if playback has started, false otherwise. @see CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Play
IsPreparing()
Check whether the media is currently opening or buffering.
Declaration
public bool IsPreparing()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if playback is being prepared, false otherwise. @see CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsReady, Play
IsReady()
Check whether media is ready for playback.
Declaration
public bool IsReady()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
A player is ready for playback if it has a media source opened that finished preparing and is not in an error state.
@return true if media is ready, false otherwise. @see HasError, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing
New(UObject, Name)
Spawn an object of this class
Declaration
public static MediaPlayer New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
MediaPlayer |
Next()
Open the next item in the current play list.
Declaration
public bool Next()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source.
@return true on success, false otherwise. @see Close, OpenUrl, OpenSource, Play, Previous, SetPlaylist
OpenFile(String)
Opens the specified media file path.
Declaration
public bool OpenFile(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!
@param FilePath The file path to open. @return true if the file path will be opened, false otherwise. @see GetUrl, Close, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen
OpenPlaylist(MediaPlaylist)
Open the first media source in the specified play list.
Declaration
public bool OpenPlaylist(MediaPlaylist InPlaylist)
Parameters
Type | Name | Description |
---|---|---|
MediaPlaylist | InPlaylist |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param InPlaylist The play list to open. @return true if the source will be opened, false otherwise. @see Close, OpenFile, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen
OpenPlaylistIndex(MediaPlaylist, Int32)
Open a particular media source in the specified play list.
Declaration
public bool OpenPlaylistIndex(MediaPlaylist InPlaylist, int Index)
Parameters
Type | Name | Description |
---|---|---|
MediaPlaylist | InPlaylist | |
System.Int32 | Index |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param InPlaylist The play list to open. @param Index The index of the source to open. @return true if the source will be opened, false otherwise. @see Close, OpenFile, OpenPlaylist, OpenSource, OpenUrl, Reopen
OpenSource(MediaSource)
Open the specified media source.
Declaration
public bool OpenSource(MediaSource MediaSource)
Parameters
Type | Name | Description |
---|---|---|
MediaSource | MediaSource |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!
@param MediaSource The media source to open. @return true if the source will be opened, false otherwise. @see Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen
OpenSourceWithOptions(MediaSource, MediaPlayerOptions)
Open the specified media source with supplied options applied.
Declaration
public bool OpenSourceWithOptions(MediaSource MediaSource, MediaPlayerOptions Options)
Parameters
Type | Name | Description |
---|---|---|
MediaSource | MediaSource | |
MediaPlayerOptions | Options |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!
@param MediaSource The media source to open. @param Options The media player options to apply. @return true if the source will be opened, false otherwise. @see Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen
OpenUrl(String)
Opens the specified media URL.
Declaration
public bool OpenUrl(string Url)
Parameters
Type | Name | Description |
---|---|---|
System.String | Url |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!
@param Url The URL to open. @return true if the URL will be opened, false otherwise. @see GetUrl, Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, Reopen
Pause()
Pauses media playback.
Declaration
public bool Pause()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This is the same as setting the playback rate to 0.0.
@return true if playback is being paused, false otherwise. @see CanPause, Close, Next, Play, Previous, Rewind, Seek
Play()
Starts media playback.
Declaration
public bool Play()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This is the same as setting the playback rate to 1.0.
@return true if playback is starting, false otherwise. @see CanPlay, GetRate, Next, Pause, Previous, SetRate
Previous()
Open the previous item in the current play list.
Declaration
public bool Previous()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source.
@return true on success, false otherwise. @see Close, Next, OpenUrl, OpenSource, Play, SetPlaylist
Reopen()
Reopens the currently opened media or play list.
Declaration
public bool Reopen()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if the media will be opened, false otherwise. @see Close, Open, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl
Rewind()
Rewinds the media to the beginning.
Declaration
public bool Rewind()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This is the same as seeking to zero time.
@return true if rewinding, false otherwise. @see GetTime, Seek
Seek(Timespan)
Seeks to the specified playback time.
Declaration
public bool Seek(Timespan Time)
Parameters
Type | Name | Description |
---|---|---|
Timespan | Time |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Time The playback time to set. @return true on success, false otherwise. @see GetTime, Rewind
SelectTrack(EMediaPlayerTrack, Int32)
Select the active track of the given type.
Declaration
public bool SelectTrack(EMediaPlayerTrack TrackType, int TrackIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The selected track will use its currently active format. Active formats will be remembered on a per track basis. The first available format is active by default. To switch the track format, use SetTrackFormat instead.
@param TrackType The type of track to select. @param TrackIndex The index of the track to select, or INDEX_NONE to deselect. @return true if the track was selected, false otherwise. @see GetNumTracks, GetSelectedTrack, SetTrackFormat
SetBlockOnTime(Timespan)
Set the time on which to block.
Declaration
public void SetBlockOnTime(Timespan Time)
Parameters
Type | Name | Description |
---|---|---|
Timespan | Time |
Remarks
If set, this player will block in TickFetch until the video sample for the specified time are actually available.
@param Time The time to block on, or FTimespan::MinValue to disable.
SetDesiredPlayerName(Name)
Set the name of the desired native player.
Declaration
public void SetDesiredPlayerName(Name PlayerName)
Parameters
Type | Name | Description |
---|---|---|
Name | PlayerName |
Remarks
@param PlayerName The name of the player to set. @see GetDesiredPlayerName
SetLooping(Boolean)
Enables or disables playback looping.
Declaration
public bool SetLooping(bool Looping)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | Looping |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Looping Whether playback should be looped. @return true on success, false otherwise. @see IsLooping
SetNativeVolume(Single)
Set the volume on the native player if not mixing with Sound Wave asset.
Declaration
public bool SetNativeVolume(float Volume)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Volume |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The SetNativeVolume can be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms.
@param Volume The volume to set. @return true on success, false otherwise. @see NativeAudioOut
SetRate(Single)
Changes the media's playback rate.
Declaration
public bool SetRate(float Rate)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Rate |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Rate The playback rate to set. @return true on success, false otherwise. @see GetRate, SupportsRate
SetTimeDelay(Timespan)
Delay of the player's time.
Declaration
public void SetTimeDelay(Timespan TimeDelay)
Parameters
Type | Name | Description |
---|---|---|
Timespan | TimeDelay |
Remarks
This setting can be used to manually sync multiple sources. Set to 1 seconds, if you would like that Player to play 1 second behind his current time. If the value is too big, it is possible that the player would not hold that frame for that long. @return true on success, false otherwise. @see GetTimeDelay
SetTrackFormat(EMediaPlayerTrack, Int32, Int32)
Set the format on the specified track.
Declaration
public bool SetTrackFormat(EMediaPlayerTrack TrackType, int TrackIndex, int FormatIndex)
Parameters
Type | Name | Description |
---|---|---|
EMediaPlayerTrack | TrackType | |
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Selecting the format will not switch to the specified track. To switch tracks, use SelectTrack instead. If the track is already selected, the format change will be applied immediately.
@param TrackType The type of track to update. @param TrackIndex The index of the track to update. @param FormatIndex The index of the format to select (must be valid). @return true if the track was selected, false otherwise. @see GetNumTrackFormats, GetNumTracks, GetTrackFormat, SelectTrack
SetVideoTrackFrameRate(Int32, Int32, Single)
Set the frame rate of the specified video track.
Declaration
public bool SetVideoTrackFrameRate(int TrackIndex, int FormatIndex, float FrameRate)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TrackIndex | |
System.Int32 | FormatIndex | |
System.Single | FrameRate |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param TrackIndex The index of the track, or INDEX_NONE for the selected one. @param FormatIndex Index of the track format, or INDEX_NONE for the selected one. @param FrameRate The frame rate to set (must be in range of format's supported frame rates). @return true on success, false otherwise. @see GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType
SetViewField(Single, Single, Boolean)
Set the field of view (only for 360 videos).
Declaration
public bool SetViewField(float Horizontal, float Vertical, bool Absolute)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Horizontal | |
System.Single | Vertical | |
System.Boolean | Absolute |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Horizontal Horizontal field of view (in Euler degrees). @param Vertical Vertical field of view (in Euler degrees). @param Whether the field of view change should be absolute (true) or relative (false). @return true on success, false otherwise. @see GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation
SetViewRotation(Rotator, Boolean)
Set the view's rotation (only for 360 videos).
Declaration
public bool SetViewRotation(Rotator Rotation, bool Absolute)
Parameters
Type | Name | Description |
---|---|---|
Rotator | Rotation | |
System.Boolean | Absolute |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Rotation The desired view rotation. @param Whether the rotation change should be absolute (true) or relative (false). @return true on success, false otherwise. @see GetViewRotation, SetViewField
SupportsRate(Single, Boolean)
Check whether the specified playback rate is supported.
Declaration
public bool SupportsRate(float Rate, bool Unthinned)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Rate | |
System.Boolean | Unthinned |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param Rate The playback rate to check. @param Unthinned Whether no frames should be dropped at the given rate. @see SupportsScrubbing, SupportsSeeking
SupportsScrubbing()
Check whether the currently loaded media supports scrubbing.
Declaration
public bool SupportsScrubbing()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if scrubbing is supported, false otherwise. @see SupportsRate, SupportsSeeking
SupportsSeeking()
Check whether the currently loaded media can jump to a certain position.
Declaration
public bool SupportsSeeking()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@return true if seeking is supported, false otherwise. @see SupportsRate, SupportsScrubbing
Operators
| Improve this Doc View SourceImplicit(IntPtr to MediaPlayer)
Convert from IntPtr to UObject
Declaration
public static implicit operator MediaPlayer(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
MediaPlayer |