C# Class Business.PlayerBusiness

Mostra file Open project: mysteryx93/NaturalGroundingPlayer Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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.

Method Details

ChangeConditions() public method

public ChangeConditions ( ) : void
return void

ClosePlayer() public method

Closes the video player.
public ClosePlayer ( ) : void
return void

ConfigurePlayer() public method

Enable/Disable SVP and madVR if necessary.
public ConfigurePlayer ( ) : void
return void

GetElementCategoriesAsync() public method

Loads the list of rating categories for the Elements combobox.
public GetElementCategoriesAsync ( ) : Task>
return Task>

GetFocusCategories() public method

Loads the list of rating categories for the Elements combobox.
public GetFocusCategories ( ) : List
return List

GetMediaObject() public method

public GetMediaObject ( string fileName ) : Media
fileName string
return DataAccess.Media

GetNextVideoDownloading() public method

If the next video is still downloading, returns its download information.
public GetNextVideoDownloading ( ) : Business.DownloadItem
return Business.DownloadItem

IsSpecialMode() public method

public IsSpecialMode ( ) : bool
return bool

PauseSession() public method

public PauseSession ( ) : void
return void

PlayerBusiness() public method

Initializes a new instance of the PlayerBusiness class.
public PlayerBusiness ( ) : System
return System

PlayerBusiness() public method

public PlayerBusiness ( IMediaPlayerBusiness player ) : System
player IMediaPlayerBusiness
return System

ReloadVideoInfo() public method

public ReloadVideoInfo ( ) : void
return void

ReplayLastAsync() public method

public ReplayLastAsync ( ) : Task
return Task

ResetPlayerMode() public method

public ResetPlayerMode ( ) : void
return void

ResumeSession() public method

public ResumeSession ( ) : void
return void

RunPlayerAsync() public method

Starts the video player.
public RunPlayerAsync ( string fileName ) : Task
fileName string
return Task

SelectNextVideoAsync() public method

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.
return Task

SetFunPauseAsync() public method

Sets the next videos to egoless pause.
public SetFunPauseAsync ( bool enabled ) : Task
enabled bool True to enable this mode, false to restore normal session.
return Task

SetNextVideoFileAsync() public method

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.
return Task

SetNextVideoIdAsync() public method

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.
return Task

SetNextVideoOptionAsync() public method

public SetNextVideoOptionAsync ( Media video ) : Task
video DataAccess.Media
return Task

SetPlayer() public method

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.
return void

SetRequestCategoryAsync() public method

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.
return Task

SetWaterVideosAsync() public method

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.
return Task

SkipVideoAsync() public method

public SkipVideoAsync ( ) : Task
return Task