Package com.brightcove.player.drm
Class CustomerRightsToken
java.lang.Object
com.brightcove.player.drm.CustomerRightsToken
An immutable transfer object that can be set the absolute expiration and play duration when
requesting an offline playback license.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPurchase license describes properties of license that has no time restrictions.static classPurchase must be used for requesting a license without time restrictions.static classThe rental license describes the time restrictions to be imposed on the license.static classRental profile must be used for requesting a license with time restrictions. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal OutputProtectionfinal com.brightcove.player.drm.CustomerRightsToken.ProfileThe profile for the offline license request.final BooleanLicense persistence can be controlled via storeLicense field in the CustomerRightsToken. -
Constructor Summary
ConstructorsConstructorDescriptionCustomerRightsToken(com.brightcove.player.drm.CustomerRightsToken.Profile profile, boolean storeLicense) Creates a new customers rights token.CustomerRightsToken(com.brightcove.player.drm.CustomerRightsToken.Profile profile, boolean storeLicense, CustomerRightsTokenConfig config) Creates a new customers rights token. -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomerRightsTokenCreates aCustomerRightsTokenfor requesting a persistent license with a purchase profilestatic CustomerRightsTokenCreates aCustomerRightsTokenfor requesting a persistent license with a purchase profilestatic CustomerRightsTokencreateRentalRightsToken(Date absoluteExpiration, Long playDuration) Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration periodstatic CustomerRightsTokencreateRentalRightsToken(Date absoluteExpiration, Long playDuration, boolean storeLicense) Creates aCustomerRightsTokenfor requesting a license with time restrictions.static CustomerRightsTokencreateRentalRightsToken(Date absoluteExpiration, Long playDuration, CustomerRightsTokenConfig config) Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration period
-
Field Details
-
profile
public final com.brightcove.player.drm.CustomerRightsToken.Profile profileThe profile for the offline license request. -
storeLicense
License persistence can be controlled via storeLicense field in the CustomerRightsToken. The effect of changing this value may vary with the DRM scheme, device and license type; for example, PlayReady rental licenses are required by specification to be persistent (in such case a false would be ignored). Some Widevine Modular devices also seem to require persistent rental licenses, else playback fails. -
outputProtection
-
-
Constructor Details
-
CustomerRightsToken
public CustomerRightsToken(com.brightcove.player.drm.CustomerRightsToken.Profile profile, boolean storeLicense) Creates a new customers rights token.- Parameters:
profile- the profile for the offline license request.storeLicense- specifies whether the license is persistent
-
CustomerRightsToken
public CustomerRightsToken(com.brightcove.player.drm.CustomerRightsToken.Profile profile, boolean storeLicense, @NonNull CustomerRightsTokenConfig config) Creates a new customers rights token.- Parameters:
profile- the profile for the offline license request.storeLicense- specifies whether the license is persistent.config- specifies extra and optional configuration.
-
-
Method Details
-
createRentalRightsToken
@NonNull public static CustomerRightsToken createRentalRightsToken(@NonNull Date absoluteExpiration, @NonNull Long playDuration, boolean storeLicense) Creates aCustomerRightsTokenfor requesting a license with time restrictions.- Parameters:
absoluteExpiration- defines how long the license is valid to start playback.playDuration- defines in milliseconds how long the content can be consumed after the start of playback.storeLicense- specifies whether the license is persistent- Returns:
- a custom rights token with the required license information.
-
createRentalRightsToken
@NonNull public static CustomerRightsToken createRentalRightsToken(@NonNull Date absoluteExpiration, @NonNull Long playDuration) Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration period- Parameters:
absoluteExpiration- defines how long the license is valid to start playback.playDuration- defines in milliseconds how long the content can be consumed after the start of playback.- Returns:
- a custom rights token with the required license information.
-
createRentalRightsToken
@NonNull public static CustomerRightsToken createRentalRightsToken(@NonNull Date absoluteExpiration, @NonNull Long playDuration, @NonNull CustomerRightsTokenConfig config) Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration period- Parameters:
absoluteExpiration- defines how long the license is valid to start playback.playDuration- defines in milliseconds how long the content can be consumed after the start of playback.config- defines additional configuration for the CustomerRightsToken- Returns:
- a custom rights token with the required license information.
-
createPurchaseRightsToken
Creates aCustomerRightsTokenfor requesting a persistent license with a purchase profile- Returns:
- a custom rights token with the required license information.
-
createPurchaseRightsToken
@NonNull public static CustomerRightsToken createPurchaseRightsToken(@NonNull CustomerRightsTokenConfig config) Creates aCustomerRightsTokenfor requesting a persistent license with a purchase profile- Parameters:
config- defines additional configuration for the CustomerRightsToken- Returns:
- a custom rights token with the required license information.
-