-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Player is not sending cookies if we attachSource #1006
Comments
@kamranhameedpl sending cookies isn't something that is generally managed by JS. Cookies are sent automatically by the browser. Does the |
Hi, Thanks for your reply. when i set the src in the video tag it sends cookies but in that way it does not understands the mpd format because the call is not generated with DASH. http://dev-cdn.dadoof.com/videos/dash/5fae5734-770e-4006-b4be-bea816b6d5be.mpd Is there any attribute something like useCredentials so we can set it true to make it send cookies when it start fetching the mpd file from the server. |
Thanks for the additional details! Knowing that this is a CORS call is super valuable! I'm not at my computer right now so I can't check if we support the send credentials option for CORS, but I'll double check later. If we do I'll let you know how to set it. If we don't we'll update this ticket with information so we can add support for it. |
if we use jquery ajax we can send withCredientials like this from the offical jquery documentation xhrFields $.ajax({ |
We don't use jQuery for XHR requests. We use the native @AkamaiDASH any input on whether we want to add @kamranhameedpl thanks for filing this bug! Supporting |
Also, it looks like we add |
I am using the cdn version of your library. which is a minified version where can i get the full version of the library ? which i can download and replace. |
Right here on GitHub! You can checkout the source modify it and build yourself a new minified version: https://github.com/Dash-Industry-Forum/dash.js |
Not sure I have an educated opinion yet on this. Seems reasonable and something to explore. |
The only downsides the adding Also if the CORS headers from the other domain doesn't allow credentials I'm not sure if |
also does this work in all browsers I think safari will have issues. |
MDN seems to think this will work in Safari, but we would definitely need to do some testing. |
Solution : add api to turn on withCredential on or off. reference in all loaders on XHR request. Default will be false. |
In looking at the fix for this one I really want to move creation of XHR objects into a central factory of some kind so I don't have to check the config setting for this and set it in every location that this is used. To that end it would probably be nice for us to build some abstraction around XHR entirely, but is likely out of scope for this issue. Any ideas or input before I dive into doing that? |
We have an issue already around refactor all loaders to what you ar saying so for 2.0 not in scope but certainly is for 2.1 ! On phone so I'll add issue number later |
Found it, #1048 I figured this was out of scope for 2.0 |
Yeah that is the one. I think this is a great project for next release. I did not want to add the withCredentials to this release because of the pending issue change. I figured @kamranhameedpl can easily add this to the XHR manually for now. |
Moving to 2.1 release should be done in conjunction with #1048 |
Is there any update on when this feature will be added? |
Still awaiting feedback from interested parties before merging. |
Hi,
I am implementing dash js in our web application. The content is protected with cookies. When i attach the source to the player and it goes to request the mpd from server it is not including cookies in the request. here is my code how can i tell the player to take cookies with it when it requests the mpd from server.
var newSource = "url to mpd"
var videoPlayer = document.getElementById("videoPlayer");
var context = new Dash.di.DashContext();
var player = new MediaPlayer(context);
player.startup();
player.attachView(videoPlayer);
player.attachSource(newSource)
The text was updated successfully, but these errors were encountered: