C# Class OnlineVideos.Sites.JSurf.ConnectorImplementations.AmazonPrime.Connectors.AmazonPrimeConnector

Connector for playing amazon prime
Inheritance: OnlineVideos.Sites.JSurf.ConnectorImplementations.BrowserUtilConnectorBase
Mostrar archivo Open project: offbyoneBB/mp-onlinevideos2

Public Methods

Method Description
BrowserDocumentComplete ( ) : EventResult

Document loaded - see what state we're in and react accordingly

OnAction ( string actionEnumName ) : void
Pause ( ) : EventResult

Pause button pressed

Play ( ) : EventResult

Play button pressed

PlayVideo ( string videoToPlay ) : EventResult

Play the specified video - try and keep the loading screen showing for as long as possible

Protected Methods

Method Description
PerformActualLogin ( string username, string password ) : EventResult

Do the login

Private Methods

Method Description
DoPlayOrPause ( ) : EventResult

Find the play/pause button and click it

SendKeyToControl ( string keyStrokeToSend ) : void

With the Amazon player it seems that setting it to full screen (_enableFullWindowPlaybackMode) it makes the Silverlight control always take focus This means that when space bar is pressed to pause it fires in the Silverlight control before the browser host causing a double press To get around this I've added a dummy control to the page which will take focus after every action to prevent Silverlight getting the event

SetTopMostActivate ( ) : void

Method Details

BrowserDocumentComplete() public method

Document loaded - see what state we're in and react accordingly
public BrowserDocumentComplete ( ) : EventResult
return OnlineVideos.Sites.Entities.EventResult

OnAction() public method

public OnAction ( string actionEnumName ) : void
actionEnumName string
return void

Pause() public method

Pause button pressed
public Pause ( ) : EventResult
return OnlineVideos.Sites.Entities.EventResult

PerformActualLogin() protected method

Do the login
protected PerformActualLogin ( string username, string password ) : EventResult
username string
password string
return OnlineVideos.Sites.Entities.EventResult

Play() public method

Play button pressed
public Play ( ) : EventResult
return OnlineVideos.Sites.Entities.EventResult

PlayVideo() public method

Play the specified video - try and keep the loading screen showing for as long as possible
public PlayVideo ( string videoToPlay ) : EventResult
videoToPlay string
return OnlineVideos.Sites.Entities.EventResult