C# Класс Business.PlayerBusiness

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ChangeConditions ( ) : void
ClosePlayer ( ) : void

Closes the video player.

ConfigurePlayer ( ) : void

Enable/Disable SVP and madVR if necessary.

GetElementCategoriesAsync ( ) : Task>

Loads the list of rating categories for the Elements combobox.

GetFocusCategories ( ) : List

Loads the list of rating categories for the Elements combobox.

GetMediaObject ( string fileName ) : Media
GetNextVideoDownloading ( ) : Business.DownloadItem

If the next video is still downloading, returns its download information.

IsSpecialMode ( ) : bool
PauseSession ( ) : void
PlayerBusiness ( ) : System

Initializes a new instance of the PlayerBusiness class.

PlayerBusiness ( IMediaPlayerBusiness player ) : System
ReloadVideoInfo ( ) : void
ReplayLastAsync ( ) : Task
ResetPlayerMode ( ) : void
ResumeSession ( ) : void
RunPlayerAsync ( string fileName ) : Task

Starts the video player.

SelectNextVideoAsync ( int queuePos, bool maintainCurrent ) : Task

Selects which video will be played next.

SetFunPauseAsync ( bool enabled ) : Task

Sets the next videos to egoless pause.

SetNextVideoFileAsync ( PlayerMode mode, string fileName ) : Task

Manually sets the next video in queue.

SetNextVideoIdAsync ( PlayerMode mode, System.Guid videoId ) : Task

Manually sets the next video in queue.

SetNextVideoOptionAsync ( Media video ) : Task
SetPlayer ( IMediaPlayerBusiness player ) : void

Uses specified player business object to play the session.

SetRequestCategoryAsync ( SearchSettings request ) : Task

Apply specified search and rating category filters to the next videos.

SetWaterVideosAsync ( bool enabled ) : Task

Sets the next videos to water videos for cool down.

SkipVideoAsync ( ) : Task

Приватные методы

Метод Описание
CancelNextDownload ( Media video ) : void

Cancels the download and autoplay of specified video.

Download_Complete ( object sender, DownloadCompletedEventArgs args ) : void

Occurs when download is completed.

PlayNextVideoAsync ( ) : Task

Plays the next video.

PrepareNextVideoAsync ( int queuePos, int attempts ) : Task

Prepares for playing the next video.

SelectNextVideoAsync ( int queuePos, bool maintainCurrent, int attempts ) : Task

Selects which video will be played next.

SetNextVideoAsync ( PlayerMode mode, Media video ) : Task
player_NowPlaying ( object sender, EventArgs e ) : void

When the player is playing a file, start the timer and notify the UI.

player_Pause ( object sender, EventArgs e ) : void

When the player stops, stop the timer and notify the UI.

player_PlayNext ( object sender, EventArgs e ) : void

When the player finishes playing a video, select the next video.

player_Resume ( object sender, EventArgs e ) : void

When the player resumes, start the timer and notify the UI.

sessionTimer_Tick ( object sender, EventArgs e ) : void

When the play timer is updated, notify the UI.

timerChangeConditions_Tick ( object sender, EventArgs e ) : void

After conditions were changed, ensure the next video still matches conditions.

Описание методов

ChangeConditions() публичный Метод

public ChangeConditions ( ) : void
Результат void

ClosePlayer() публичный Метод

Closes the video player.
public ClosePlayer ( ) : void
Результат void

ConfigurePlayer() публичный Метод

Enable/Disable SVP and madVR if necessary.
public ConfigurePlayer ( ) : void
Результат void

GetElementCategoriesAsync() публичный Метод

Loads the list of rating categories for the Elements combobox.
public GetElementCategoriesAsync ( ) : Task>
Результат Task>

GetFocusCategories() публичный Метод

Loads the list of rating categories for the Elements combobox.
public GetFocusCategories ( ) : List
Результат List

GetMediaObject() публичный Метод

public GetMediaObject ( string fileName ) : Media
fileName string
Результат DataAccess.Media

GetNextVideoDownloading() публичный Метод

If the next video is still downloading, returns its download information.
public GetNextVideoDownloading ( ) : Business.DownloadItem
Результат Business.DownloadItem

IsSpecialMode() публичный Метод

public IsSpecialMode ( ) : bool
Результат bool

PauseSession() публичный Метод

public PauseSession ( ) : void
Результат void

PlayerBusiness() публичный Метод

Initializes a new instance of the PlayerBusiness class.
public PlayerBusiness ( ) : System
Результат System

PlayerBusiness() публичный Метод

public PlayerBusiness ( IMediaPlayerBusiness player ) : System
player IMediaPlayerBusiness
Результат System

ReloadVideoInfo() публичный Метод

public ReloadVideoInfo ( ) : void
Результат void

ReplayLastAsync() публичный Метод

public ReplayLastAsync ( ) : Task
Результат Task

ResetPlayerMode() публичный Метод

public ResetPlayerMode ( ) : void
Результат void

ResumeSession() публичный Метод

public ResumeSession ( ) : void
Результат void

RunPlayerAsync() публичный Метод

Starts the video player.
public RunPlayerAsync ( string fileName ) : Task
fileName string
Результат Task

SelectNextVideoAsync() публичный Метод

Selects which video will be played next.
public SelectNextVideoAsync ( int queuePos, bool maintainCurrent ) : Task
queuePos int The video position to select. 0 for current, 1 for next.
maintainCurrent bool True to keep the next video and only select alternate options, false to change next video.
Результат Task

SetFunPauseAsync() публичный Метод

Sets the next videos to egoless pause.
public SetFunPauseAsync ( bool enabled ) : Task
enabled bool True to enable this mode, false to restore normal session.
Результат Task

SetNextVideoFileAsync() публичный Метод

Manually sets the next video in queue.
public SetNextVideoFileAsync ( PlayerMode mode, string fileName ) : Task
mode PlayerMode
fileName string The name of the file to play.
Результат Task

SetNextVideoIdAsync() публичный Метод

Manually sets the next video in queue.
public SetNextVideoIdAsync ( PlayerMode mode, System.Guid videoId ) : Task
mode PlayerMode
videoId System.Guid The ID of the video play next.
Результат Task

SetNextVideoOptionAsync() публичный Метод

public SetNextVideoOptionAsync ( Media video ) : Task
video DataAccess.Media
Результат Task

SetPlayer() публичный Метод

Uses specified player business object to play the session.
public SetPlayer ( IMediaPlayerBusiness player ) : void
player IMediaPlayerBusiness The player business object through which to play the session.
Результат void

SetRequestCategoryAsync() публичный Метод

Apply specified search and rating category filters to the next videos.
public SetRequestCategoryAsync ( SearchSettings request ) : Task
request DataAccess.SearchSettings The search filters being requested, or null to disable the request category mode.
Результат Task

SetWaterVideosAsync() публичный Метод

Sets the next videos to water videos for cool down.
public SetWaterVideosAsync ( bool enabled ) : Task
enabled bool True to enable this mode, false to restore normal session.
Результат Task

SkipVideoAsync() публичный Метод

public SkipVideoAsync ( ) : Task
Результат Task