Interface IVideoPlayer
Interface for a video player.
Namespace: Evergine.Common.Media
Assembly: Evergine.Common.dll
Syntax
public interface IVideoPlayer
Properties
IsLooped
Gets or sets a value indicating whether the player is playing a video on a loop.
Declaration
bool IsLooped { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsMuted
Gets or sets a value indicating whether the video player is muted.
Declaration
bool IsMuted { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsVideoSupported
Gets a value indicating whether Video texture is supported on this device.
Declaration
bool IsVideoSupported { get; }
Property Value
Type | Description |
---|---|
bool |
PlayPosition
Gets or sets a value indicating the play position within the currently playing video.
Declaration
TimeSpan PlayPosition { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
State
Gets the state.
Declaration
VideoState State { get; }
Property Value
Type | Description |
---|---|
VideoState |
Video
Gets the video currently playing.
Declaration
IVideoInfo Video { get; }
Property Value
Type | Description |
---|---|
IVideoInfo |
VideoTexture
Gets a Texture containing the frame of the video being played.
Declaration
Texture VideoTexture { get; }
Property Value
Type | Description |
---|---|
Texture |
Volume
Gets or sets a value indicating the volume of the video player.
Declaration
float Volume { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Pause()
Pauses the currently playing video.
Declaration
void Pause()
Play(IVideoInfo)
Plays the video.
Declaration
void Play(IVideoInfo video)
Parameters
Type | Name | Description |
---|---|---|
IVideoInfo | video | Video info instance. |
Resume()
Resumes a paused video.
Declaration
void Resume()
Stop()
Stops the video from playing.
Declaration
void Stop()
Update(TimeSpan)
Updates the video player.
Declaration
void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | Game time. |
VideoInfoFromPath(string)
Gets video info from path.
Declaration
IVideoInfo VideoInfoFromPath(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | Video path. |
Returns
Type | Description |
---|---|
IVideoInfo | Platform-specific video info. |
Events
OnComplete
Event fired when the video playback is completed
Declaration
event EventHandler OnComplete
Event Type
Type | Description |
---|---|
EventHandler |
OnError
Event fired when there is an error during video playback
Declaration
event EventHandler OnError
Event Type
Type | Description |
---|---|
EventHandler |
OnVideoTexture
Event fired when the video texture is updated.
Declaration
event EventHandler OnVideoTexture
Event Type
Type | Description |
---|---|
EventHandler |