Package com.castlabs.android.drm
Class DrmTodayConfiguration
- java.lang.Object
-
- com.castlabs.android.drm.DrmConfiguration
-
- com.castlabs.android.drm.DrmTodayConfiguration
-
- All Implemented Interfaces:
Parcelable
public class DrmTodayConfiguration extends DrmConfiguration implements Parcelable
This class contains the configuration parameters necessary to use DRMtoday with the player. Please use theDrmTodayConfiguration.Builderto create instances of this class.- Since:
- 3.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDrmTodayConfiguration.BuilderA builder implementation to create instances ofDrmTodayConfigurationsstatic interfaceDrmTodayConfiguration.Environment-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description List<String>additionalAssetIdsOptional additional assetIds for content with tracks encrypted with different keysStringassetIdThe asset IDStringauthTokenThe DRMToday auth tokenstatic Parcelable.Creator<DrmTodayConfiguration>CREATORThe Parcel creatorstatic Map<Drm,String>DRMTODAY_ONBOARD_PATHSThis map is used for DRMtoday Onboard to configure the paths for the different DRM systems.static StringDRMTODAY_PRODUCTIONBase URI for the DRMToday production environmentstatic StringDRMTODAY_STAGINGBase URI for the DRMToday staging environmentstatic StringDRMTODAY_TESTBase URI for the DRMToday test environmentStringdrmTodayMobileRoapUrlThe DRMToday Mobile roap urlbooleanisDRMTodayMobileSet to true for DRMToday Mobile configurationsStringmerchantThe merchantStringrequestIdThe request IDStringsessionIdThe session IDStringuserIdThe user IDStringvariantIdThe variant ID-
Fields inherited from class com.castlabs.android.drm.DrmConfiguration
audioDrm, drm, forceWidevineL3, keyRotation, mediaDrmProperties, offlineId, playClearSamplesWithoutKeys, renewalThresholdMs, requestParameters, url
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()StringgetCustomDataJSON()StringgetOmaActivationServerUrl()This returns a custom OMA activation server URL if DRMtoday Onboard is used and a custom URL is configured.StringgetUrl()StringtoString()voidwriteToParcel(Parcel dest, int flags)-
Methods inherited from class com.castlabs.android.drm.DrmConfiguration
equals, getSecurityLevel, hashCode, renewalEnabled, resolvedAudioDrm, resolvedDrm
-
-
-
-
Field Detail
-
DRMTODAY_PRODUCTION
public static final String DRMTODAY_PRODUCTION
Base URI for the DRMToday production environment- See Also:
- Constant Field Values
-
DRMTODAY_STAGING
public static final String DRMTODAY_STAGING
Base URI for the DRMToday staging environment- See Also:
- Constant Field Values
-
DRMTODAY_TEST
public static final String DRMTODAY_TEST
Base URI for the DRMToday test environment- See Also:
- Constant Field Values
-
DRMTODAY_ONBOARD_PATHS
public static final Map<Drm,String> DRMTODAY_ONBOARD_PATHS
This map is used for DRMtoday Onboard to configure the paths for the different DRM systems. The map contains an encoded URL path that will be appended to the base URL for the specific DRM system. The defaults are:- OMA:
cmmlaoma/ - Widevine:
widevine/ - Playready:
Rightsmanager.asmx
- OMA:
-
CREATOR
public static final Parcelable.Creator<DrmTodayConfiguration> CREATOR
The Parcel creator
-
userId
@NonNull public final String userId
The user ID
-
sessionId
@NonNull public final String sessionId
The session ID
-
merchant
@NonNull public final String merchant
The merchant
-
assetId
@Nullable public final String assetId
The asset ID
-
requestId
@NonNull public final String requestId
The request ID
-
authToken
@Nullable public final String authToken
The DRMToday auth token
-
variantId
@Nullable public final String variantId
The variant ID
-
isDRMTodayMobile
public final boolean isDRMTodayMobile
Set to true for DRMToday Mobile configurations
-
drmTodayMobileRoapUrl
@Nullable public final String drmTodayMobileRoapUrl
The DRMToday Mobile roap url
-
-
Method Detail
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable- Overrides:
describeContentsin classDrmConfiguration
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcelin interfaceParcelable- Overrides:
writeToParcelin classDrmConfiguration
-
toString
public String toString()
- Overrides:
toStringin classDrmConfiguration
-
getCustomDataJSON
public String getCustomDataJSON()
- Returns:
- generated JSON to provide to the MediaDrm callbacks.
-
getUrl
public String getUrl()
- Returns:
- The URL to the backend for the selected DRM
-
getOmaActivationServerUrl
@NonNull public String getOmaActivationServerUrl()
This returns a custom OMA activation server URL if DRMtoday Onboard is used and a custom URL is configured.- Returns:
- Activation server url or empty string
-
-