-
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
Add ability to intercept network requests to add additional query params or headers #148
Comments
We would need the same. It would be awesome to have a callback for each video and being able to change the url completely for each video before loading it actually. We are thinking of dynamically generate temporary (secure) S3 url which work for 15min per video. |
@priyajeet from #162 wrote
By-design the API only modifies segment request URLs and headers. For live-content, the server can specify the next MPD update URL via the |
If the contents of the MPD are being fetched from /foo/bar/baz.mpd, and the server expects some authentication headers in that request, then yeah one would need the MPD url to also go through the same interceptor. This is just for getting the static MPD. Basically anything leaving the domain of the dash library needs to be intercepted by the app before it hits the server. |
@tdrews, it seems the idea is that we have a static manifest, but the server has some front-end that does authentication based on headers or parameters before serving the static content. Seems as reasonable as the rest of the feature request, so re-opening. |
Hi @joeyparrish , Is this feature not available for the latest V2 player |
...or provide the ability to add additional query params or optional headers to the Player / VideoSource constructor
...or re-use the query params provided on the MPD url for network requests to the content segments.
Use case: When serving an mpd file /foo/bar.mpd?foo=bar, requests that go out to fetch the mp4 segments should also have ?foo=bar. This is useful in providing some context, auth tokens etc if needed when the MPD file is static but the content requires some additional information based on who is trying to fetch it.
Something similar is accomplished in dash.js by overriding MediaPlayer.dependencies.RequestModifierExtensions
More info: https://groups.google.com/forum/#!topic/shaka-player-users/kmT_-eVn1ZM
Thanks
The text was updated successfully, but these errors were encountered: