@Emits(events={"setMediaInfo","addMediaInfo","setMediaControllerConfig","removeVideoStill","setVideoStill","setSource","pause","stop","play","restoreDefaultMediaController"}) @ListensFor(events={"completed","didSeekTo","didSetVideo","progress","setSource","play","controlBarCreated","castSessionStarted","castSessionEnded","activityStarted"}) public class BrightcoveCastMediaManager extends AbstractComponent
eventEmitter, listenerTokens| Constructor and Description |
|---|
BrightcoveCastMediaManager(android.content.Context context,
EventEmitter eventEmitter) |
BrightcoveCastMediaManager(android.content.Context context,
EventEmitter eventEmitter,
MediaControllerConfig mediaControllerConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMediaInfo() |
protected void |
addMediaInfo(com.google.android.gms.cast.MediaInfo mediaInfo) |
protected org.json.JSONObject |
createCastCustomData(CustomData customData,
Video video) |
void |
enableCustomData(boolean enableCustomData)
If enabled, custom data is added to the MediaInfo object when sending information to the
Cast receiver app.
|
CustomData |
getCustomData() |
boolean |
isAutoCastIfPlaying()
If enabled, the video playing locally will be automatically loaded to your Chromecast app receiver
as soon as you get connected.
|
boolean |
isCustomDataEnabled()
Whether custom data is enabled or not.
|
boolean |
isSessionAvailable() |
protected void |
loadMediaInfo() |
protected void |
loadMediaInfo(com.google.android.gms.cast.MediaInfo mediaInfo) |
protected void |
loadMediaInfo(com.google.android.gms.cast.MediaInfo mediaInfo,
long positionMs) |
protected void |
onConnectionAvailable(Event event) |
protected void |
onConnectionUnavailable(Event event) |
protected void |
resetToLocalController() |
void |
setAutoCastIfPlaying(boolean autoCastIfPlaying)
If enabled, the video playing locally will be automatically loaded to your Chromecast app receiver
as soon as you get connected.
|
void |
setCustomData(CustomData customData)
The Brightcove
CustomData to be used when sending custom data to the Cast receiver app. |
void |
setQueueingSupported(boolean isQueueingSupported)
Whether queueing is supported in the cast receiver app.
|
protected void |
setupBrightcoveControlBar(BrightcoveControlBar controlBar) |
protected void |
setupRemoteController() |
void |
updateBrightcoveMediaController(boolean isRemote) |
addListener, addOnceListener, getEventEmitter, removeListener, removeListenerspublic BrightcoveCastMediaManager(android.content.Context context,
EventEmitter eventEmitter)
public BrightcoveCastMediaManager(android.content.Context context,
EventEmitter eventEmitter,
MediaControllerConfig mediaControllerConfig)
public boolean isSessionAvailable()
public void updateBrightcoveMediaController(boolean isRemote)
public boolean isAutoCastIfPlaying()
public void setAutoCastIfPlaying(boolean autoCastIfPlaying)
autoCastIfPlaying - true to enable auto cast if playing.public void setCustomData(@Nullable
CustomData customData)
CustomData to be used when sending custom data to the Cast receiver app.@Nullable public CustomData getCustomData()
public void enableCustomData(boolean enableCustomData)
enableCustomData - Whether to enable or disable custom data.public void setQueueingSupported(boolean isQueueingSupported)
isQueueingSupported - Whether queuing is supported in the Cast receiver app.public boolean isCustomDataEnabled()
protected void loadMediaInfo()
protected void loadMediaInfo(@NonNull
com.google.android.gms.cast.MediaInfo mediaInfo)
protected void loadMediaInfo(@NonNull
com.google.android.gms.cast.MediaInfo mediaInfo,
long positionMs)
protected void addMediaInfo()
protected void addMediaInfo(com.google.android.gms.cast.MediaInfo mediaInfo)
protected void onConnectionAvailable(Event event)
protected void onConnectionUnavailable(Event event)
protected void setupRemoteController()
protected void resetToLocalController()
protected void setupBrightcoveControlBar(BrightcoveControlBar controlBar)
@Nullable
protected org.json.JSONObject createCastCustomData(@Nullable
CustomData customData,
@Nullable
Video video)