Class BrightcoveCastMediaManager

java.lang.Object
com.brightcove.player.event.AbstractComponent
com.brightcove.cast.controller.BrightcoveCastMediaManager
All Implemented Interfaces:
Component

@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
  • Constructor Details

    • BrightcoveCastMediaManager

      public BrightcoveCastMediaManager(android.content.Context context, EventEmitter eventEmitter)
    • BrightcoveCastMediaManager

      public BrightcoveCastMediaManager(android.content.Context context, EventEmitter eventEmitter, MediaControllerConfig mediaControllerConfig)
  • Method Details

    • isSessionAvailable

      public boolean isSessionAvailable()
    • updateBrightcoveMediaController

      public void updateBrightcoveMediaController(boolean isRemote)
    • isAutoCastIfPlaying

      public boolean isAutoCastIfPlaying()
      If enabled, the video playing locally will be automatically loaded to your Chromecast app receiver as soon as you get connected.
      Returns:
      true to enable auto cast if playing.
    • setAutoCastIfPlaying

      public 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.
      Parameters:
      autoCastIfPlaying - true to enable auto cast if playing.
    • setCustomData

      public void setCustomData(@Nullable CustomData customData)
      The Brightcove CustomData to be used when sending custom data to the Cast receiver app.
    • getCustomData

      @Nullable public CustomData getCustomData()
    • enableCustomData

      public void enableCustomData(boolean enableCustomData)
      If enabled, custom data is added to the MediaInfo object when sending information to the Cast receiver app. Otherwise, custom data is not added.
      Parameters:
      enableCustomData - Whether to enable or disable custom data.
    • setQueueingSupported

      public void setQueueingSupported(boolean isQueueingSupported)
      Whether queueing is supported in the cast receiver app.

      If true, queueing option is not displayer to the user. Otherwise, the is shown.

      Parameters:
      isQueueingSupported - Whether queuing is supported in the Cast receiver app.
    • isCustomDataEnabled

      public boolean isCustomDataEnabled()
      Whether custom data is enabled or not.
    • loadMediaInfo

      protected void loadMediaInfo()
    • loadMediaInfo

      protected void loadMediaInfo(@NonNull com.google.android.gms.cast.MediaInfo mediaInfo)
    • loadMediaInfo

      protected void loadMediaInfo(@NonNull com.google.android.gms.cast.MediaInfo mediaInfo, long positionMs)
    • addMediaInfo

      protected void addMediaInfo()
    • addMediaInfo

      protected void addMediaInfo(com.google.android.gms.cast.MediaInfo mediaInfo)
    • onConnectionAvailable

      protected void onConnectionAvailable(Event event)
    • onConnectionUnavailable

      protected void onConnectionUnavailable(Event event)
    • setupRemoteController

      protected void setupRemoteController()
    • resetToLocalController

      protected void resetToLocalController()
    • setupBrightcoveControlBar

      protected void setupBrightcoveControlBar(BrightcoveControlBar controlBar)
    • createCastCustomData

      @Nullable protected org.json.JSONObject createCastCustomData(@Nullable CustomData customData, @Nullable Video video)