DefaultDrmSessionManagerProvider


@UnstableApi
class DefaultDrmSessionManagerProvider : DrmSessionManagerProvider


Default implementation of DrmSessionManagerProvider.

Summary

Public constructors

Public functions

DrmSessionManager!
get(mediaItem: MediaItem!)

Returns a DrmSessionManager for the given media item.

Unit

Sets the DataSource.Factory which is used to create HttpMediaDrmCallback instances.

Unit
setDrmLoadErrorHandlingPolicy(
    drmLoadErrorHandlingPolicy: LoadErrorHandlingPolicy!
)

Sets a load error handling policy to pass to setLoadErrorHandlingPolicy.

Unit
setDrmUserAgent(userAgent: String?)

This function is deprecated.

Pass a custom DataSource.Factory to setDrmHttpDataSourceFactory which sets the desired user agent on outgoing requests.

Public constructors

DefaultDrmSessionManagerProvider

DefaultDrmSessionManagerProvider()

Public functions

get

fun get(mediaItem: MediaItem!): DrmSessionManager!

Returns a DrmSessionManager for the given media item.

The caller is responsible for preparing the before use, and subsequently releasing it.

setDrmHttpDataSourceFactory

fun setDrmHttpDataSourceFactory(drmDataSourceFactory: DataSource.Factory?): Unit

Sets the DataSource.Factory which is used to create HttpMediaDrmCallback instances. If null is passed a DefaultHttpDataSource.Factory is used.

Parameters
drmDataSourceFactory: DataSource.Factory?

The data source factory or null to use .

setDrmLoadErrorHandlingPolicy

fun setDrmLoadErrorHandlingPolicy(
    drmLoadErrorHandlingPolicy: LoadErrorHandlingPolicy!
): Unit

Sets a load error handling policy to pass to setLoadErrorHandlingPolicy.

If null is passed the setter is not called, so the default defined by Builder is used instead.

setDrmUserAgent

fun setDrmUserAgent(userAgent: String?): Unit