Package com.brightcove.player.drm
Class CustomerRightsToken
- java.lang.Object
-
- com.brightcove.player.drm.CustomerRightsToken
-
public class CustomerRightsToken extends java.lang.ObjectAn immutable transfer object that can be set the absolute expiration and play duration when requesting an offline playback license.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomerRightsToken.PurchaseLicensePurchase license describes properties of license that has no time restrictions.static classCustomerRightsToken.PurchaseProfilePurchase must be used for requesting a license without time restrictions.static classCustomerRightsToken.RentalLicenseThe rental license describes the time restrictions to be imposed on the license.static classCustomerRightsToken.RentalProfileRental profile must be used for requesting a license with time restrictions.
-
Field Summary
Fields Modifier and Type Field Description OutputProtectionoutputProtectioncom.brightcove.player.drm.CustomerRightsToken.ProfileprofileThe profile for the offline license request.java.lang.BooleanstoreLicenseLicense persistence can be controlled via storeLicense field in the CustomerRightsToken.
-
Constructor Summary
Constructors Constructor Description CustomerRightsToken(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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CustomerRightsTokencreatePurchaseRightsToken()Creates aCustomerRightsTokenfor requesting a persistent license with a purchase profilestatic CustomerRightsTokencreatePurchaseRightsToken(CustomerRightsTokenConfig config)Creates aCustomerRightsTokenfor requesting a persistent license with a purchase profilestatic CustomerRightsTokencreateRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration)Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration periodstatic CustomerRightsTokencreateRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration, boolean storeLicense)Creates aCustomerRightsTokenfor requesting a license with time restrictions.static CustomerRightsTokencreateRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration, CustomerRightsTokenConfig config)Creates aCustomerRightsTokenfor requesting a persistent license with the specified absolute expiration period
-
-
-
Field Detail
-
profile
public final com.brightcove.player.drm.CustomerRightsToken.Profile profile
The profile for the offline license request.
-
storeLicense
public final java.lang.Boolean 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
public final OutputProtection outputProtection
-
-
Constructor Detail
-
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 Detail
-
createRentalRightsToken
@NonNull public static CustomerRightsToken createRentalRightsToken(@NonNull java.util.Date absoluteExpiration, @NonNull java.lang.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 java.util.Date absoluteExpiration, @NonNull java.lang.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 java.util.Date absoluteExpiration, @NonNull java.lang.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
@NonNull public static CustomerRightsToken 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.
-
-