Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom DrmSessionManager construction inside MediaSourceFactory #8466

Closed
icbaker opened this issue Jan 15, 2021 · 0 comments
Closed

Allow custom DrmSessionManager construction inside MediaSourceFactory #8466

icbaker opened this issue Jan 15, 2021 · 0 comments
Assignees

Comments

@icbaker
Copy link
Collaborator

icbaker commented Jan 15, 2021

As suggested by @zilinx in #8108 (comment):

There is DefaultMediaSourceFactory.setDrmSessionManager(), but that is inconvenient because I would need to have the information about my asset at the time of creating the player. I would prefer to set a factory like the one used by default, if custom drm session manager is not set (MediaSourceDrmHelper), https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java#L240.

As part of this we will likely remove/deprecate MediaSourceFactory.setDrmUserAgent() and MediaSourceFactory.setDrmHttpDataSourceFactory() since these customisations can be done directly by providing a DrmSessionManagerProvider (the new name for MediaSourceDrmHelper).

We will also probably remove/deprecate MediaSourceFactory.setDrmSessionManager() - a single manager can be used just by passing a provider that always returns the same instance.

@icbaker icbaker self-assigned this Jan 15, 2021
@icbaker icbaker changed the title Customise DrmSessionManager construction inside MediaSourceFactory Allow custom DrmSessionManager construction inside MediaSourceFactory Jan 15, 2021
ojw28 pushed a commit that referenced this issue Jan 19, 2021
Also move it to the `drm` package, and extract a
`DrmSessionManagerProvider` interface.

I'll add `MediaSourceFactory.setDrmSessionProvider()` in a follow-up
change.

Issue: #8466
PiperOrigin-RevId: 352582559
kim-vde pushed a commit that referenced this issue Jan 22, 2021
Deprecate other DRM config methods.

Issue: #8466
PiperOrigin-RevId: 353251452
@ojw28 ojw28 closed this as completed Feb 4, 2021
@google google locked and limited conversation to collaborators Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants