-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Previously registered requestFilters are not used in the NetworkingEngine for a PreloadManager. #6698
Comments
Here's a suggested fix. It adds a |
That solution could work, but I don't want to offload too much of the work in getting the preload system to work onto the developer. It should ideally be as painless as possible to adopt. For various technical reasons (stuff like tracking stats) we make a new networking engine for each preload manager. |
Some assets might rely on networking engine filters (request and response filters) to properly download their assets. However, the preload manager's need to use a fresh networking engine also caused it to not use any filters set on the player already. This changes the process of setting up a preload manager, to make it copy over any filters defined on the player's networking engine. Issue shaka-project#6698
Yep, agree on making it easy for the application developer. The commit I made used that approach to copy each of the requestFilters_ from the Player's networking engine to the PreloadManager's networking engine. As well as the responseFilters_. I'll be happy to open a PR with that commit. |
@jason-s13r see: #6709 |
Some assets might rely on networking engine filters (request and response filters) to properly download their assets. However, the preload manager's need to use a fresh networking engine also caused it to not use any filters set on the player already. This changes the process of setting up a preload manager, to make it copy over any filters defined on the player's networking engine. Fixes #6698
Whoops, I totally did not notice the commit you linked. |
Some assets might rely on networking engine filters (request and response filters) to properly download their assets. However, the preload manager's need to use a fresh networking engine also caused it to not use any filters set on the player already. This changes the process of setting up a preload manager, to make it copy over any filters defined on the player's networking engine. Fixes #6698
Have you read the FAQ and checked for duplicate open issues?
Yes, though this #6616 closed issue is similar and I left a comment there.
If the problem is related to FairPlay, have you read the tutorial?
No.
What version of Shaka Player are you using?
4.8.7.
Can you reproduce the issue with our latest release version?
Yes.
Can you reproduce the issue with the latest code from
main
?Yes.
Are you using the demo app or your own custom app?
Custom.
If custom app, can you reproduce the issue using our demo app?
Yes.
What browser and OS are you using?
Chrome, Safari; Windows, MacOS.
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A
What are the manifest and license server URIs?
From demo.
What configuration are you using? What is the output of
player.getConfiguration()
?With default from demo.
What did you do?
We've been having trouble with
shaka.media.PreloadManager
not sending cookies with preload requests despite the player's networking engine having a request filter to setrequest.allowCrossSiteCredentials = true
.I believe that this is due to the
shaka.Player.makePreloadManager_
creating a networking engine for the preload manager in /lib/player.js#L2109.const networkingEngine = this.createNetworkingEngine(getPreloadManager);
This new networking engine has empty sets for
requestFilters_
andresponseFilters_
for the preload manager.I think a PreloadManager should expose a getNetworkingEngine(), and/or copy the sets from the player's networking engine, or use the same networking engine.
Using the Shaka demo website with uncompiled v4.8.7, I can use in the JS console:
What did you expect to happen?
I expected requests made from a PreloadManager to have the adjustments made by the registered request filter from the player's networking engine (ie, contains
?__viaRequestFilter=true
).In our custom app, this would be to set
request.allowCrossSiteCredentials = true
.What actually happened?
Manifest requests are preloaded as-expected, using the request filters previously registered with
player.getNetworkingEngine().registerRequestFilter()
.But the preloaded segment requests, and perhaps other requests types, do not appear to use the same filters.
In our custom app, the failure to set
request.allowCrossSiteCredentials = true
causes 403 on the preloaded requests.Are you planning send a PR to fix it?
Perhaps, at least to add
getNetworkingEngine()
toshaka.media.PreloadManager
.The text was updated successfully, but these errors were encountered: