new ChromecastSender(player, chromecastAppId)
Cast sender
Parameters:
| Name | Type | Description |
|---|---|---|
player |
Player | The |
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 functionalitystring Returns:
canOverride
- Type
- boolean
-
cast()
-
cast
-
casting(state)
-
Sets if the player is chromecasting
Parameters:
Name Type Description stateboolean -
castSession(session)
-
Assigns and returns the session to the chromecast
Parameters:
Name Type Description sessionObject 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 sessionObject startTimenumber = Infinity
-
loadQue(sources, startTime)
-
Casting Que
Parameters:
Name Type Argument Description sourcesArray.<Object> startTimenumber <nullable>
-
loadSources(sources, startTime)
-
Casting Sources
Parameters:
Name Type Argument Description sourcesArray.<Object> startTimenumber <nullable>
-
onAvailability(availability)
-
Callback triggered when chromecast available devices are updated
Parameters:
Name Type Description availabilitystring -
onCastError(castError)
-
Callback triggered when chromecast error is issued
Parameters:
Name Type Description castErrorObject -
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 sessionObject -
onMediaLoaded(mediaSession, caller)
-
Callback triggered when media is loaded into chromecast
Parameters:
Name Type Description mediaSessionObject callerObject -
onMediaUpdateEvent(mediaSession)
-
onMediaUpdateEvent
Parameters:
Name Type Description mediaSessionstring -
onStopCasting(takebackSession)
-
onStopCasting
Parameters:
Name Type Default Description takebackSessionboolean true -
playExternalStreamLocally(source)
-
playExternalStreamLocally
Parameters:
Name Type Description sourceObject -
playLocally(stopTime)
-
playLocally
Parameters:
Name Type Description stopTimenumber -
playProgramLocally()
-
playProgramLocally
-
reJoin()
-
Trigger a join of the Global castSession
-
requestLoadMedia_(loadRequest, isQue)
-
requestLoadMedia
Parameters:
Name Type Description loadRequestObject isQuebool -
setplayerOptions(options)
-
setplayerOptions
Parameters:
Name Type Description optionsObject -
showBrowserChromecastDialog()
-
Show native chromecast browser dialog
-
stopCasting()
-
Stops casting
-
ui(ccButton)
-
Assigns a UI element to the CC manager
Parameters:
Name Type Description ccButtonObject Returns:
The CC button
- Type
- * | Button
EMP Html5 Player 2