Package com.brightcove.player.drm
Class CustomerRightsToken
- java.lang.Object
-
- com.brightcove.player.drm.CustomerRightsToken
-
public class CustomerRightsToken extends java.lang.Object
An 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 class
CustomerRightsToken.PurchaseLicense
Purchase license describes properties of license that has no time restrictions.static class
CustomerRightsToken.PurchaseProfile
Purchase must be used for requesting a license without time restrictions.static class
CustomerRightsToken.RentalLicense
The rental license describes the time restrictions to be imposed on the license.static class
CustomerRightsToken.RentalProfile
Rental profile must be used for requesting a license with time restrictions.
-
Field Summary
Fields Modifier and Type Field Description OutputProtection
outputProtection
com.brightcove.player.drm.CustomerRightsToken.Profile
profile
The profile for the offline license request.java.lang.Boolean
storeLicense
License 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 CustomerRightsToken
createPurchaseRightsToken()
Creates aCustomerRightsToken
for requesting a persistent license with a purchase profilestatic CustomerRightsToken
createPurchaseRightsToken(CustomerRightsTokenConfig config)
Creates aCustomerRightsToken
for requesting a persistent license with a purchase profilestatic CustomerRightsToken
createRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration)
Creates aCustomerRightsToken
for requesting a persistent license with the specified absolute expiration periodstatic CustomerRightsToken
createRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration, boolean storeLicense)
Creates aCustomerRightsToken
for requesting a license with time restrictions.static CustomerRightsToken
createRentalRightsToken(java.util.Date absoluteExpiration, java.lang.Long playDuration, CustomerRightsTokenConfig config)
Creates aCustomerRightsToken
for 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 aCustomerRightsToken
for 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 aCustomerRightsToken
for 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 aCustomerRightsToken
for 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 aCustomerRightsToken
for 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 aCustomerRightsToken
for 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.
-
-