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)
and GoogleCastManager.startCasting(Bundle, SessionManager, MediaMetadata) methods will map the info
from the provided PlayerController or Bundle respectively. If any of those
mappings should be changed or any further fields should be added, do so in the onSendCastRequest(Bundle, JSONObject).
-
Method Summary
Modifier and TypeMethodDescriptionvoidonSendCastRequest(Bundle bundle, JSONObject jsonObject) Will be called with the built JSONObject right before sending it to the cast device.
-
Method Details
-
onSendCastRequest
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 thePlayerControllerifGoogleCastManager.startCasting(PlayerController, SessionManager, MediaMetadata)was used instead.jsonObject- An instance ofJSONObjectthat 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.
-