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

Support playlists of DRM Protected Content with different DRM License Urls? #2394

Closed
Jogan opened this issue Jan 30, 2017 · 11 comments
Closed
Assignees

Comments

@Jogan
Copy link

Jogan commented Jan 30, 2017

Is there any documentation for how to handle playing a list of drm protected content each with a dynamic license url (i.e. https://www.somewidevineurl.com/videos/{{video-id}}/)?

Playlist:

I am using the StreamingDrmSessionManager and then plan to use a ConcatenatingMediaSource for the playlist. The example uses a static license url for the HttpMediaDrmCallback.

@ojw28 ojw28 changed the title Question: How to Handle List of DRM Protected Content with Dynamic DRM License Urls? Support playlists of DRM Protected Content with different DRM License Urls? Jan 30, 2017
@ojw28
Copy link
Contributor

ojw28 commented Jan 30, 2017

This is on our todo list, but is not something we currently support. Isn't the video id normally retrievable from the body of the key request? In which case one option would be to have a single license URL and have the server get the video id from the request body.

@Jogan
Copy link
Author

Jogan commented Jan 30, 2017

I'll look into the server option, otherwise is the only way to release the player and then re-initialize it with the next item in the playlist? I guess I'll have to manually handle the playback for the playlist as well rather than using the ConcatenatingMediaSource.

@ojw28
Copy link
Contributor

ojw28 commented Jan 30, 2017

That's correct until we add support (we don't have an ETA, but we're aware of the fact we're not adequately supporting this use case).

@piatt
Copy link

piatt commented Jan 2, 2018

Any updates on ETA for this? I also have the same need. Thanks!

@ojw28 ojw28 assigned AquilesCanta and unassigned ojw28 May 9, 2018
@AquilesCanta
Copy link
Contributor

This can now be solved by including the license server url in the manifest or, alternatively, injecting the server URL into the manifest through a custom playlist parser. We will keep working around per-MediaSource DRM so it's not a definitive solution, but it's a start.

@kushalgupta0565
Copy link

kushalgupta0565 commented Feb 11, 2019

Hi,

I am new to exoplayer and these .MPD file things. But i am trying to get it. I am facing the similar challenge as mention above. I am trying to use multiple DRM license with a single exoplayer instance.

I have downloaded multiple license byte array using

public byte[] generateOfflineLicenseKeySet() {
        try {
            byte[] offlineLicenseKeySet = licenseComponent.getOfflineLicenseHelper().downloadLicense(getDrmInitData(licenseComponent.getDataSourceFactory()));
            saveOfflineLicenseKeySet(mpd_path, offlineLicenseKeySet);
            return offlineLicenseKeySet;
        } catch (DrmSession.DrmSessionException e) {
            e.printStackTrace();
        }
        return null;
    }

but not able to figure out how to pass them while creating the instance of Exoplayer.

I am using DashMediaSource.Factory for generating the instance of MediaSource

new DashMediaSource.Factory(dataSourceFactory)
                    .setManifestParser(
                            new FilteringManifestParser<>(new DashManifestParser(), getOfflineStreamKeys(uri))).setTag(mediaData)

I tried to setMode for DefaultDrmSessionManager but it is working only for single MediaSource

drmSessionManager.setMode(DefaultDrmSessionManager.MODE_PLAYBACK,AppUtils.StringToByteArray(offlineLicenseKeyStr));

Do i need to pass the offlineLicenseKeySet during the creation of MediaSource.
Please suggest me a way to use multiple DRM license with a single exoplayer instance

@kgrevehagen
Copy link

@AquilesCanta Any update on this issue or ETA? I guess the final solution also will resolve #5619? Any ideas on workarounds I can do in the meantime?

@AquilesCanta
Copy link
Contributor

I guess the final solution also will resolve #5619?

Yes.

Any ideas on workarounds I can do in the meantime?

Sorry I can't provide a short guidance on this, changes are pretty big. Thanks for your patience.

@stefanmoro
Copy link

This can now be solved by including the license server url in the manifest or, alternatively, injecting the server URL into the manifest through a custom playlist parser. We will keep working around per-MediaSource DRM so it's not a definitive solution, but it's a start.

@AquilesCanta Can you please give an example of where and what to insert into the (I assume) DASH manifest? If this works the way I understand it, it could probably be a workaround we can use until the refactoring you're working on is done.

Thanks
Stefan

@AquilesCanta
Copy link
Contributor

@stefanmoro, see #3393. This feature should be available soon. Possibly in the next release.

@ojw28
Copy link
Contributor

ojw28 commented Aug 2, 2019

You can now set a DrmSessionManager directly on a MediaSource, as shown in the demo app. Since this allows specifying a different DrmSessionManager on each MediaSource, it solves the problem that's being tracked by this issue.

This improvement will be included in the 2.11.0 release (we don't have an ETA yet).

@ojw28 ojw28 closed this as completed Aug 2, 2019
@google google locked and limited conversation to collaborators Oct 3, 2019
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

7 participants