Skip to content

IVideoPlayer

Namespace: VideoCataloger

Type: Interface

Interface to control the video player.

Definition

public interface IVideoPlayer

Methods

Method Description
SetSelectedVideo(long, string, double, string, byte[], string) Set the selected video in the video player. Encrypted parameters are only needed for encrypted videos.
Seek(double) Seek to a time in the video
GetPlayPosition() Get the current play position in seconds
UnPauseMovie() Resume playing from pause
PauseMovie() Toggle Pause of video
PauseNoToggleMovie() Pause movie but do not start it if it is already paused
PlayMovie() Play video
StopMovie() Stop the video
PlayFromTimeMS(double) Start playing from the provided time from the start
GetPlaybackRate() Get the current playback speed. 1.0 is normal playback speed.
SetPlaybackRate(float) Set the speed factor of video playback, 1.0 is normal speed.
IsFullscreen() Is the video in fullscreen mode?
IsVideoPlaying() Return true if the video is playing
IsVideoPaused() Return true if the video is paused
IsVideoStopped() Return true if the video is stopped
GetSelectedVideoPath() Get the path of the video currently selected in the player.
GetSelectedVideoID() Get the video catalog id of the video currently selected in the player.
GetSelectedVideoID() Get the video catalog id of the video currently selected in the player.

SetSelectedVideo

Set the selected video in the video player. Encrypted parameters are only needed for encrypted videos.

void SetSelectedVideo(long video_id, string video_path, double video_length, string encrypted, byte[] IV, string key)

Parameters:

Name Type Description
video_id Int64 ID of the video.
video_path String Path to the video.
video_length Double Length of the video.
encrypted String For encryted videos.
IV Byte[] For encryted videos.
key String For encryted videos.

Seek

Seek to a time in the video

void Seek(double seek_to)

Parameters:

Name Type Description
seek_to Double s from start of video.

GetPlayPosition

Get the current play position in seconds

double GetPlayPosition()

Returns: Double


UnPauseMovie

Resume playing from pause

void UnPauseMovie()

PauseMovie

Toggle Pause of video

void PauseMovie()

PauseNoToggleMovie

Pause movie but do not start it if it is already paused

void PauseNoToggleMovie()

PlayMovie

Play video

void PlayMovie()

StopMovie

Stop the video

void StopMovie()

PlayFromTimeMS

Start playing from the provided time from the start

Task PlayFromTimeMS(double seek_to)

Parameters:

Name Type Description
seek_to Double s from start of video.

Returns: Threading.Tasks.Task


GetPlaybackRate

Get the current playback speed. 1.0 is normal playback speed.

float GetPlaybackRate()

Returns: Single - Current plyback rate where 1 is normal speed, 2 is double playback speed.


SetPlaybackRate

Set the speed factor of video playback, 1.0 is normal speed.

void SetPlaybackRate(float speed_factor)

Parameters:

Name Type Description
speed_factor Single

IsFullscreen

Is the video in fullscreen mode?

bool IsFullscreen()

Returns: Boolean - True if the video is´in fullscreen mode.


IsVideoPlaying

Return true if the video is playing

bool IsVideoPlaying()

Returns: Boolean - True if the video is´playing.


IsVideoPaused

Return true if the video is paused

bool IsVideoPaused()

Returns: Boolean - True if the video is´paused.


IsVideoStopped

Return true if the video is stopped

bool IsVideoStopped()

Returns: Boolean - True if the video is´stopped.


GetSelectedVideoPath

Get the path of the video currently selected in the player.

string GetSelectedVideoPath()

Returns: String - Full path to the video selected in the video player.


GetSelectedVideoID

Get the video catalog id of the video currently selected in the player.

long GetSelectedVideoID()

Returns: Int64 - ID of the video selected in the video player.


GetSelectedVideoID

Get the video catalog id of the video currently selected in the player.

long GetSelectedVideoID()

Returns: Int64 - ID of the video selected in the video player.