Package com.castlabs.sdk.googlecast
Interface GoogleCastManager.CastInfoProvider
-
- Enclosing class:
- GoogleCastManager
public static interface GoogleCastManager.CastInfoProvider
Optional cast info provider to add or modify request cast params.The
GoogleCastManager.startCasting(PlayerController, SessionManager, MediaMetadata)
andGoogleCastManager.startCasting(Bundle, SessionManager, MediaMetadata)
methods will map the info from the providedPlayerController
orBundle
respectively. If any of those mappings should be changed or any further fields should be added, do so in theonSendCastRequest(Bundle, JSONObject)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onSendCastRequest(Bundle bundle, JSONObject jsonObject)
Will be called with the built JSONObject right before sending it to the cast device.
-
-
-
Method Detail
-
onSendCastRequest
void onSendCastRequest(@NonNull Bundle bundle, @NonNull JSONObject jsonObject)
Will be called with the built JSONObject right before sending it to the cast device.Any desired changes should be done on the provided JSONObject.
- Parameters:
bundle
- The bundle provided when callingGoogleCastManager.startCasting(Bundle, SessionManager, MediaMetadata)
or the one created mapping info from thePlayerController
ifGoogleCastManager.startCasting(PlayerController, SessionManager, MediaMetadata)
was used instead.jsonObject
- An instance ofJSONObject
that can be modified. This object will be sent to the cast device as a param in theMediaInfo.Builder.setCustomData(JSONObject)
method. If you want to access/modify drm-related info, use the "drmtoday" or "drm" fields for DrmToday or other kind of Drm respectively. If no Drm info was provided in the Bundle passed toGoogleCastManager.startCasting(Bundle, SessionManager, MediaMetadata)
these keys won't exist in this object. In that case, you should also set on it the"drmProtected"
key totrue
.
-
-