-
Notifications
You must be signed in to change notification settings - Fork 6k
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
How to get response header from Lincence url request? #5740
Comments
Response headers on onLoadStarted() callback are always empty perhaps you can use onLoadCompleted(). |
Okay, I will test tomorrow and let you know. Though so far I did not even see loadEventInfo.uri == licenseUrl in the onLoadStarted event. Should that also come there? (with the License url) |
Yeah, I am able to see the response headers of the playback urls. For each chunk it is there in onLoadCompleted(). But the issue still exists regarding the license request. For that the response header is not exposed in those callbacks. Is there any way of grabbing the reponse header of the licence request? |
Assuming you are using DefaultDrmSessionManager, all license requests are done through MediaDrmCallback so you can look into it to intercept the response headers. When you create an HttpMediaDrmCallback to pass to the DefaultDrmSessionManager, you can either pass a custom HttpDataSource.Factory or use instead a custom MediaDrmCallback that obtains the response headers through DataSource#getResponseHeaders. Hope this helps. |
Okay, so when the player does the license request, it should go through either of the two methods of MediaDrmCallback interface, right? Trying to add a custom callback to intercept the response headers. |
In the long term, we should ensure these load events are reported through the normal |
Side note: for now using a custom MediaDrmCallback seems to be the easiest solution, and works perfectly fine. Thanks for all the help so far, and waiting for the deeper integration :) |
Yes, sounds like a duplicate. Using the other one for tracking and closing this one. |
Hi all!
I know that the response headers of the last load are available through the onLoadStarted() callback (as part of LoadEventInfo).
However I would need to parse the headers of the licence url request and as I see that is not passed there. Am I missing something? Should I somehow be able to read the response headers of the licence url request?
Thanks in advance,
Balázs
The text was updated successfully, but these errors were encountered: