C# 클래스 OnlineVideos.MediaPortal2.WebBrowserVideoPlayer

Player which automates a web browser - will minimise MediaPortal and shell to the WebBrowserHost when play is requested
상속: IPlayer, IPlayerEvents, IUIContributorPlayer
파일 보기 프로젝트 열기: offbyoneBB/mp-onlinevideos2 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_ended PlayerEventDlgt
_playbackError PlayerEventDlgt
_playbackStateChanged PlayerEventDlgt
_processPath string
_started PlayerEventDlgt
_stateReady PlayerEventDlgt
_stopped PlayerEventDlgt

공개 메소드들

메소드 설명
Dispose ( ) : void

Clean up

Init ( MediaItem mediaItem ) : bool
InitializePlayerEvents ( PlayerEventDlgt started, PlayerEventDlgt stateReady, PlayerEventDlgt stopped, PlayerEventDlgt ended, PlayerEventDlgt playbackStateChanged, PlayerEventDlgt playbackError ) : void
Play ( ) : bool

Play the specified file - file will actually be the video id from the website This method will hide MediaPortal and run the BrowserHost - BorwserHost needs to support the WebAutomationType and have the code to actually navigate to the site

Prepare ( MediaItem mediaItem ) : void

We require the command line parameters for the web browser host Util should be an implementation of IBrowserSiteUtil

ResetPlayerEvents ( ) : void
Stop ( ) : void
SuspendMP ( bool suspend ) : void

Suspend mediaportal and hide the window

_callback_OnBrowserKeyPress ( int keyPressed ) : void

When the browser has a key press, try and map it to an action and fire the on action

보호된 메소드들

메소드 설명
Ended ( ) : void
FireEnded ( ) : void
FirePlaybackStateChanged ( ) : void
FireStarted ( ) : void
FireStateReady ( ) : void
FireStopped ( ) : void

비공개 메소드들

메소드 설명
BrowserProcess_Exited ( object sender, EventArgs e ) : void

Restore the MP window

GetRunningProcess ( string processName ) : void
InstanceOnKeyPressed ( MediaPortal.UI.Control.InputManager.Key &key ) : void

When a new action is received we'll forward them to the browser host using a WCF service

IsPassThrough ( MediaPortal.UI.Control.InputManager.Key key, string &action ) : bool

Handles key presses that should be simply forwarded to client (especially number keys).

KillBrowserProcess ( ) : void

Kill the browser process if it's set to an instance

ProcessActionArguments ( string &action ) : void
Redirect ( StreamReader input ) : void

Read the standard streams using a separate thread

ReinitialiseService ( ) : void

Initialise the connection to the service

Shutdown ( ) : void
ToggleMinimise ( bool shouldMinimise ) : void

We'll use reflection to call in to some core MediaPortal methods to minimise to the system tray This seems to work better that other methods I've found because they cause MediaPortal to hog a core when set to suspending

_callback_OnBrowserHostClosing ( object sender, EventArgs e ) : void

Handles the event from the browser host telling us its closing

메소드 상세

Dispose() 공개 메소드

Clean up
public Dispose ( ) : void
리턴 void

Ended() 보호된 메소드

protected Ended ( ) : void
리턴 void

FireEnded() 보호된 메소드

protected FireEnded ( ) : void
리턴 void

FirePlaybackStateChanged() 보호된 메소드

protected FirePlaybackStateChanged ( ) : void
리턴 void

FireStarted() 보호된 메소드

protected FireStarted ( ) : void
리턴 void

FireStateReady() 보호된 메소드

protected FireStateReady ( ) : void
리턴 void

FireStopped() 보호된 메소드

protected FireStopped ( ) : void
리턴 void

Init() 공개 메소드

public Init ( MediaItem mediaItem ) : bool
mediaItem MediaItem
리턴 bool

InitializePlayerEvents() 공개 메소드

public InitializePlayerEvents ( PlayerEventDlgt started, PlayerEventDlgt stateReady, PlayerEventDlgt stopped, PlayerEventDlgt ended, PlayerEventDlgt playbackStateChanged, PlayerEventDlgt playbackError ) : void
started PlayerEventDlgt
stateReady PlayerEventDlgt
stopped PlayerEventDlgt
ended PlayerEventDlgt
playbackStateChanged PlayerEventDlgt
playbackError PlayerEventDlgt
리턴 void

Play() 공개 메소드

Play the specified file - file will actually be the video id from the website This method will hide MediaPortal and run the BrowserHost - BorwserHost needs to support the WebAutomationType and have the code to actually navigate to the site
public Play ( ) : bool
리턴 bool

Prepare() 공개 메소드

We require the command line parameters for the web browser host Util should be an implementation of IBrowserSiteUtil
public Prepare ( MediaItem mediaItem ) : void
mediaItem MediaItem
리턴 void

ResetPlayerEvents() 공개 메소드

public ResetPlayerEvents ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void

SuspendMP() 공개 메소드

Suspend mediaportal and hide the window
public SuspendMP ( bool suspend ) : void
suspend bool
리턴 void

_callback_OnBrowserKeyPress() 공개 메소드

When the browser has a key press, try and map it to an action and fire the on action
public _callback_OnBrowserKeyPress ( int keyPressed ) : void
keyPressed int Key pressed in browser
리턴 void

프로퍼티 상세

_ended 보호되어 있는 프로퍼티

protected PlayerEventDlgt _ended
리턴 PlayerEventDlgt

_playbackError 보호되어 있는 프로퍼티

protected PlayerEventDlgt _playbackError
리턴 PlayerEventDlgt

_playbackStateChanged 보호되어 있는 프로퍼티

protected PlayerEventDlgt _playbackStateChanged
리턴 PlayerEventDlgt

_processPath 보호되어 있는 프로퍼티

protected string _processPath
리턴 string

_started 보호되어 있는 프로퍼티

protected PlayerEventDlgt _started
리턴 PlayerEventDlgt

_stateReady 보호되어 있는 프로퍼티

protected PlayerEventDlgt _stateReady
리턴 PlayerEventDlgt

_stopped 보호되어 있는 프로퍼티

protected PlayerEventDlgt _stopped
리턴 PlayerEventDlgt