Show / Hide Table of Contents

Class MediaPlayer

Implements a media player asset that can play movies and other media sources.

Inheritance
System.Object
UObject
MediaPlayer
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.MediaAssets
Assembly: UE4DotNet.dll
Syntax
public class MediaPlayer : UObject

Properties

| Improve this Doc View Source

AffectedByPIEHandling

Declaration
public bool AffectedByPIEHandling { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static MediaPlayer DefaultObject { get; }
Property Value
Type Description
MediaPlayer
| Improve this Doc View Source

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

| Improve this Doc View Source

Loop

Declaration
public bool Loop { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

NativeAudioOut

Declaration
public bool NativeAudioOut { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

PlayerGuid

The player's globally unique identifier.

Declaration
public FGuid PlayerGuid { get; set; }
Property Value
Type Description
FGuid
| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

PlayOnOpen

Declaration
public bool PlayOnOpen { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Shuffle

Declaration
public bool Shuffle { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class
| Improve this Doc View Source

TimeDelay

Delay of the player's time.

Declaration
public Timespan TimeDelay { get; }
Property Value
Type Description
Timespan
Remarks

@see SetTimeDelay, GetTimeDelay

| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

CanPause()

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

Close()

Close the currently open media, if any.

Declaration
public void Close()
Remarks

@see OnMediaClosed, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Pause, Play

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

GetPlaylistIndex()

Get the current play list index.

Declaration
public int GetPlaylistIndex()
Returns
Type Description
System.Int32
Remarks

@return Play list index. @see GetPlaylist

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

GetTime()

Get the media's current playback time.

Declaration
public Timespan GetTime()
Returns
Type Description
Timespan
Remarks

@return Playback time. @see GetDuration, Seek

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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
| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

Implicit(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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX