-
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
Allow no-cors on fetch request #5959
Comments
So what you propose is to use no-cors for HEAD requests? If you can share the manifest with me so I can investigate the issue and provide an appropriate solution. Thanks! |
I have been looking and it is not possible, in no-cors mode we do not have access to the headers, so we can not detect the mimetype correctly. |
Oh, you're totally right. Here's the manifest anyway:
Thanks for the quick answer. |
In fact, @avelad, I'd like a little help here, if you can. But in my own app, it's a What's the explanation? |
I don't have an explanation for this, maybe @theodab can help here. |
Thanks. |
My bad... On the demo page, I was providing the manifest's URL for the representation of highest quality: But in my app (and it's my use case), I'm providing the playlist's URL: Which leads to downloading this:
In conclusion, giving a playlist causes a |
The difference is that when you provide the master playlist, since we have all the information, we only need to make a HEAD to obtain the contentType, but when you provide a half playlist we have to obtain all the information, so we download the entire segment. |
OK, I understand the "why", but now, I need to make it work. 😄 I also found this issue which is very similar to mine: And from what I read, it led to a PR that was merged 2 years ago. Shouldn't |
Wow, that was fast! |
It works like a charm. |
Sorry to bother you again but it seems like the same behavior is needed here as well: shaka-player/lib/net/networking_utils.js Lines 23 to 41 in 7fd99b7
I indeed have another case where the playlist itself doesn't have any extension, and redirects to a a |
Thank you so much. |
I was looking for a solution to my problem and found the following issue:
#1286
I think I have indeed found a use case for such a request.
I have an HLS manifest in which segments don't have any extension.
Then, as shown in code below, the parser does a
HEAD
request to retrieve the mime type:shaka-player/lib/hls/hls_parser.js
Lines 3754 to 3761 in 678bf25
And in my case, a CORS error happens.
Since I don't have any control on the manifest and I don't care about the anwser (only the response headers matter), a
no-cors
fetch request would certainly solves my issue.What do you think?
The text was updated successfully, but these errors were encountered: