Class: ChromecastSender

ChromecastSender


new ChromecastSender(player, chromecastAppId)

Cast sender

Parameters:
Name Type Description
player Player

The Player that this class should be attached to.

chromecastAppId string

chromecast application ID

Members


player

Assigns a player to the CC manager


player

Gets the assigned player to a CC manager

Methods


canOverride(functionality)

canOverride

Parameters:
Name Type Description
functionality string
Returns:

canOverride

Type
boolean

cast()

cast


casting(state)

Sets if the player is chromecasting

Parameters:
Name Type Description
state boolean

castSession(session)

Assigns and returns the session to the chromecast

Parameters:
Name Type Description
session Object
Returns:

the session to the chromecast

Type
* | Session

clearSession()

Clears the chromecast session but doest no disposes it


dispose()

dispose


dummyButton()

dummy ui button for when there is no ui associated with chromecast

Returns:

dummyButton

Type
Object

init()

Initializes chromecast


initiated()

Checks if manager has been initiated

Returns:

is initiated

Type
boolean

isCasting()

Returns the casting state

Returns:

is Casting

Type
* | boolean

isJoined()

isJoined

Returns:

isJoined

Type
boolean

loadMedia(session, startTime)

Loads a new media into a chromecast session

Parameters:
Name Type Description
session Object
startTime number

= Infinity


loadQue(sources, startTime)

Casting Que

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

loadSources(sources, startTime)

Casting Sources

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

onAvailability(availability)

Callback triggered when chromecast available devices are updated

Parameters:
Name Type Description
availability string

onCastError(castError)

Callback triggered when chromecast error is issued

Parameters:
Name Type Description
castError Object

onCastingUpdateEvent()

Callback called when chromecast event is triggered.


onInit()

Callback triggered when chromecast is successfully initiated


onJoin(session)

Callback triggered when chromecast session is successfully joined

Parameters:
Name Type Description
session Object

onMediaLoaded(mediaSession, caller)

Callback triggered when media is loaded into chromecast

Parameters:
Name Type Description
mediaSession Object
caller Object

onMediaUpdateEvent(mediaSession)

onMediaUpdateEvent

Parameters:
Name Type Description
mediaSession string

onStopCasting(takebackSession)

onStopCasting

Parameters:
Name Type Default Description
takebackSession boolean true

playExternalStreamLocally(source)

playExternalStreamLocally

Parameters:
Name Type Description
source Object

playLocally(stopTime)

playLocally

Parameters:
Name Type Description
stopTime number

playProgramLocally()

playProgramLocally


reJoin()

Trigger a join of the Global castSession


requestLoadMedia_(loadRequest, isQue)

requestLoadMedia

Parameters:
Name Type Description
loadRequest Object
isQue bool

setplayerOptions(options)

setplayerOptions

Parameters:
Name Type Description
options Object

showBrowserChromecastDialog()

Show native chromecast browser dialog


stopCasting()

Stops casting


ui(ccButton)

Assigns a UI element to the CC manager

Parameters:
Name Type Description
ccButton Object
Returns:

The CC button

Type
* | Button

Class: ChromecastSender

ChromecastSender


new ChromecastSender(player, chromecastAppId)

constructor

Parameters:
Name Type Description
player Player

The Player that this class should be attached to.

chromecastAppId string

chromecast application ID

Members


player

Assigns a player to the CC manager


player

Gets the assigned player to a CC manager

Methods


canOverride(functionality)

canOverride

Parameters:
Name Type Description
functionality string
Returns:

canOverride

Type
boolean

cast()

cast


casting(state)

Sets if the player is chromecasting

Parameters:
Name Type Description
state boolean

castSession(session)

Assigns and returns the session to the chromecast

Parameters:
Name Type Description
session Object
Returns:

the session to the chromecast

Type
* | Session

clearSession()

Clears the chromecast session but doest no disposes it


dispose()

dispose


dummyButton()

dummy ui button for when there is no ui associated with chromecast

Returns:

dummyButton

Type
Object

init()

Initializes chromecast


initiated()

Checks if manager has been initiated

Returns:

is initiated

Type
boolean

isCasting()

Returns the casting state

Returns:

is Casting

Type
* | boolean

isJoined()

isJoined

Returns:

isJoined

Type
boolean

loadMedia(session, startTime)

Loads a new media into a chromecast session

Parameters:
Name Type Description
session Object
startTime number

= Infinity


loadQue(sources, startTime)

Casting Que

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

loadSources(sources, startTime)

Casting Sources

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

onAvailability(availability)

Callback triggered when chromecast available devices are updated

Parameters:
Name Type Description
availability string

onCastError(castError)

Callback triggered when chromecast error is issued

Parameters:
Name Type Description
castError Object

onCastingUpdateEvent()

Callback called when chromecast event is triggered.


onInit()

Callback triggered when chromecast is successfully initiated


onJoin(session)

Callback triggered when chromecast session is successfully joined

Parameters:
Name Type Description
session Object

onMediaLoaded(mediaSession, caller)

Callback triggered when media is loaded into chromecast

Parameters:
Name Type Description
mediaSession Object
caller Object

onMediaUpdateEvent(mediaSession)

onMediaUpdateEvent

Parameters:
Name Type Description
mediaSession string

onStopCasting(takebackSession)

onStopCasting

Parameters:
Name Type Default Description
takebackSession boolean true

playExternalStreamLocally(source)

playExternalStreamLocally

Parameters:
Name Type Description
source Object

playLocally(stopTime)

playLocally

Parameters:
Name Type Description
stopTime number

playProgramLocally()

playProgramLocally


reJoin()

Trigger a join of the Global castSession


requestLoadMedia_(loadRequest, isQue)

requestLoadMedia

Parameters:
Name Type Description
loadRequest Object
isQue bool

setplayerOptions(options)

setplayerOptions

Parameters:
Name Type Description
options Object

showBrowserChromecastDialog()

Show native chromecast browser dialog


stopCasting()

Stops casting


ui(ccButton)

Assigns a UI element to the CC manager

Parameters:
Name Type Description
ccButton Object
Returns:

The CC button

Type
* | Button

Class: ChromecastSender

ChromecastSender


new ChromecastSender()

Chromecast Media Controller - Wrapper for HTML5 Media API

Extends

  • Tech

Members


player

Assigns a player to the CC manager


player

Gets the assigned player to a CC manager

Methods


canOverride(functionality)

canOverride

Parameters:
Name Type Description
functionality string
Returns:

canOverride

Type
boolean

cast()

cast


casting(state)

Sets if the player is chromecasting

Parameters:
Name Type Description
state boolean

castSession(session)

Assigns and returns the session to the chromecast

Parameters:
Name Type Description
session Object
Returns:

the session to the chromecast

Type
* | Session

clearSession()

Clears the chromecast session but doest no disposes it


dispose()

dispose


dummyButton()

dummy ui button for when there is no ui associated with chromecast

Returns:

dummyButton

Type
Object

init()

Initializes chromecast


initiated()

Checks if manager has been initiated

Returns:

is initiated

Type
boolean

isCasting()

Returns the casting state

Returns:

is Casting

Type
* | boolean

isJoined()

isJoined

Returns:

isJoined

Type
boolean

loadMedia(session, startTime)

Loads a new media into a chromecast session

Parameters:
Name Type Description
session Object
startTime number

= Infinity


loadQue(sources, startTime)

Casting Que

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

loadSources(sources, startTime)

Casting Sources

Parameters:
Name Type Argument Description
sources Array.<Object>
startTime number <nullable>

onAvailability(availability)

Callback triggered when chromecast available devices are updated

Parameters:
Name Type Description
availability string

onCastError(castError)

Callback triggered when chromecast error is issued

Parameters:
Name Type Description
castError Object

onCastingUpdateEvent()

Callback called when chromecast event is triggered.


onInit()

Callback triggered when chromecast is successfully initiated


onJoin(session)

Callback triggered when chromecast session is successfully joined

Parameters:
Name Type Description
session Object

onMediaLoaded(mediaSession, caller)

Callback triggered when media is loaded into chromecast

Parameters:
Name Type Description
mediaSession Object
caller Object

onMediaUpdateEvent(mediaSession)

onMediaUpdateEvent

Parameters:
Name Type Description
mediaSession string

onStopCasting(takebackSession)

onStopCasting

Parameters:
Name Type Default Description
takebackSession boolean true

playExternalStreamLocally(source)

playExternalStreamLocally

Parameters:
Name Type Description
source Object

playLocally(stopTime)

playLocally

Parameters:
Name Type Description
stopTime number

playProgramLocally()

playProgramLocally


reJoin()

Trigger a join of the Global castSession


requestLoadMedia_(loadRequest, isQue)

requestLoadMedia

Parameters:
Name Type Description
loadRequest Object
isQue bool

setplayerOptions(options)

setplayerOptions

Parameters:
Name Type Description
options Object

showBrowserChromecastDialog()

Show native chromecast browser dialog


stopCasting()

Stops casting


ui(ccButton)

Assigns a UI element to the CC manager

Parameters:
Name Type Description
ccButton Object
Returns:

The CC button

Type
* | Button