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
Modifier and TypeClassDescriptionstatic class
Purchase license describes properties of license that has no time restrictions.static class
Purchase must be used for requesting a license without time restrictions.static class
The rental license describes the time restrictions to be imposed on the license.static class
Rental profile must be used for requesting a license with time restrictions. -
Field Summary
Modifier and TypeFieldDescriptionfinal OutputProtection
final com.brightcove.player.drm.CustomerRightsToken.Profile
The profile for the offline license request.final Boolean
License persistence can be controlled via storeLicense field in the CustomerRightsToken. -
Constructor Summary
ConstructorDescriptionCustomerRightsToken
(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 CustomerRightsToken
Creates aCustomerRightsToken
for requesting a persistent license with a purchase profilestatic CustomerRightsToken
Creates aCustomerRightsToken
for requesting a persistent license with a purchase profilestatic CustomerRightsToken
createRentalRightsToken
(Date absoluteExpiration, Long playDuration) Creates aCustomerRightsToken
for requesting a persistent license with the specified absolute expiration periodstatic CustomerRightsToken
createRentalRightsToken
(Date absoluteExpiration, Long playDuration, boolean storeLicense) Creates aCustomerRightsToken
for requesting a license with time restrictions.static CustomerRightsToken
createRentalRightsToken
(Date absoluteExpiration, Long playDuration, CustomerRightsTokenConfig config) Creates aCustomerRightsToken
for 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 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 Date absoluteExpiration, @NonNull 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 Date absoluteExpiration, @NonNull 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
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.
-