-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Preload does not use NetworkingEngine configuration #6616
Comments
I tried running your code segment in the demo app, and the network requests for the manifest had an Authorization header of "Some Access Token". From a code standpoint, I'm not really sure what would cause this. The preload manager uses the networking engine of the player instance, and thus would use the request filters defined on the player. |
Thanks @theodab! That's interesting, I'll have a deeper look next week and let you know if I can find more insights |
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including |
@mathix420 did you get to the bottom of this? |
@shaka-bot reopen This is in reference to @jimmymic's comment above. We've been having trouble with I believe that this is due to the This new networking engine has empty sets for 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: const player = new shaka.Player();
await player.attach(document.getElementById('video'));
player.getNetworkingEngine().registerRequestFilter(function (_type, request) {
request.uris = request.uris.map(uri => uri + (uri.includes('?') ? '&' : '?') + '__viaRequestFilter=true');
});
const manager = await player.preload(shakaAssets.testAssets[1].manifestUri);
manager.networkingEngine_.registerRequestFilter(function (_type, request) {
request.uris = request.uris.map(uri => uri + (uri.includes('?') ? '&' : '?') + '__preload=true');
});
const manager2 = await player.preload(shakaAssets.testAssets[1].manifestUri); |
Have you read the FAQ and checked for duplicate open issues? Yes
If the problem is related to FairPlay, have you read the tutorial? Not related
What version of Shaka Player are you using? 4.8.4
Can you reproduce the issue with our latest release version? Yes
Can you reproduce the issue with the latest code from
main
? YesAre you using the demo app or your own custom app? Custom app
If custom app, can you reproduce the issue using our demo app? No
What browser and OS are you using? Chrome & Linux
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
What configuration are you using? What is the output of
player.getConfiguration()
?What did you do?
What did you expect to happen?
Preload requests should have the Authorization header (just like usual requests).
What actually happened?
Preload requests didn't had the Authorization header.
Are you planning send a PR to fix it?
No, sorry.
The text was updated successfully, but these errors were encountered: