C# 클래스 OnlineVideos.MediaPortal1.Player.WebBrowserVideoPlayer

Player which automates a web browser - will minimise MediaPortal and shell to the WebBrowserHost when play is requested
상속: MediaPortal.Player.IPlayer, OVSPLayer
파일 보기 프로젝트 열기: offbyoneBB/mp-onlinevideos2

공개 메소드들

메소드 설명
Dispose ( ) : void

Clean up

Initialise ( SiteUtilBase util ) : void

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

Play ( string strFile ) : 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

비공개 메소드들

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

Restore the MP window

GUIWindowManager_OnNewAction ( MediaPortal action ) : void

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

KillBrowserProcess ( ) : void

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

Redirect ( StreamReader input ) : void

Read the standard streams using a separate thread

ReinitialiseService ( ) : void

Initialise the connection to the service

SuspendMP ( bool suspend ) : void

Suspend mediaportal and hide the window

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

_callback_OnBrowserKeyPress ( int keyPressed ) : void

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

_callback_OnBrowserWndProc ( Message msg ) : bool

Handle wnd proc from the browser host to try and translate to an action

메소드 상세

Dispose() 공개 메소드

Clean up
public Dispose ( ) : void
리턴 void

Initialise() 공개 메소드

We require the command line parameters for the web browser host Util should be an implementation of IBrowserSiteUtil
public Initialise ( SiteUtilBase util ) : void
util OnlineVideos.Sites.SiteUtilBase
리턴 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 ( string strFile ) : bool
strFile string
리턴 bool