MediaItem.DrmConfiguration


public final class MediaItem.DrmConfiguration


DRM configuration for a media item.

Summary

Nested types

Builder for DrmConfiguration.

Public fields

final boolean

Whether to force use of licenseUri even if the media specifies its own DRM license server URI.

final ImmutableList<@C.TrackType Integer>

The types of tracks for which to always use a DRM session even if the content is unencrypted.

final @Nullable byte[]
final ImmutableMap<StringString>

The headers to attach to requests sent to the DRM license server.

final @Nullable Uri

Optional default DRM license server Uri.

final boolean

Whether the DRM configuration is multi session enabled.

final boolean

Whether clear samples within protected content should be played when keys for the encrypted part of the content have yet to be loaded.

final ImmutableMap<StringString>

This field is deprecated.

Use licenseRequestHeaders instead.

final UUID

The UUID of the protection scheme.

final ImmutableList<@C.TrackType Integer>

This field is deprecated.

Use forcedSessionTrackTypes.

final UUID

This field is deprecated.

Use scheme instead.

Public methods

MediaItem.DrmConfiguration.Builder

Returns a Builder initialized with the values of this instance.

boolean
static MediaItem.DrmConfiguration

Restores a DrmConfiguration from a Bundle.

@Nullable byte[]

Returns the key set ID of the offline license.

int
Bundle

Public fields

forceDefaultLicenseUri

public final boolean forceDefaultLicenseUri

Whether to force use of licenseUri even if the media specifies its own DRM license server URI.

forcedSessionTrackTypes

public final ImmutableList<@C.TrackType IntegerforcedSessionTrackTypes

The types of tracks for which to always use a DRM session even if the content is unencrypted.

keySetId

public final @Nullable byte[] keySetId

licenseRequestHeaders

public final ImmutableMap<StringStringlicenseRequestHeaders

The headers to attach to requests sent to the DRM license server.

licenseUri

public final @Nullable Uri licenseUri

Optional default DRM license server Uri. If null then the DRM license server must be specified by the media.

multiSession

public final boolean multiSession

Whether the DRM configuration is multi session enabled.

playClearContentWithoutKey

public final boolean playClearContentWithoutKey

Whether clear samples within protected content should be played when keys for the encrypted part of the content have yet to be loaded.

requestHeaders

@UnstableApi
public final ImmutableMap<StringStringrequestHeaders

scheme

public final UUID scheme

The UUID of the protection scheme.

sessionForClearTypes

@UnstableApi
public final ImmutableList<@C.TrackType IntegersessionForClearTypes

uuid

@UnstableApi
public final UUID uuid

Public methods

buildUpon

public MediaItem.DrmConfiguration.Builder buildUpon()

Returns a Builder initialized with the values of this instance.

equals

public boolean equals(@Nullable Object obj)

fromBundle

@UnstableApi
public static MediaItem.DrmConfiguration fromBundle(Bundle bundle)

Restores a DrmConfiguration from a Bundle.

getKeySetId

public @Nullable byte[] getKeySetId()

Returns the key set ID of the offline license.

hashCode

public int hashCode()

toBundle

@UnstableApi
public Bundle toBundle()