-
Notifications
You must be signed in to change notification settings - Fork 241
Media elements from other sites do not load #125
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
Comments
We should be able to make this work by spinning up a server that proxies content from https://sveltejs.github.io/assets but adds COEP/COOP/CORP/whatever headers. Not 100% sure if it'll work for range requests (i.e. the video), but it'd work for images, and should be simple to implement using edge functions |
https://learn.svelte.dev/tutorial/sharing-code now works! Will try the video example next. Not sure what to do about the other two examples (and the https://httpstatusdogs.com example I wanted to add for error pages) since proxying other people's stuff is a bit cheeky |
Proxying everything sounds risky, but if we scope that to to a whitelist of what we have in the tutorial (the video link, status dogs, the link to those image placeholders), it would be ok? |
it'd be scoped, yeah. i'm not too concerned about risks, i'm more concerned about ethics/legality. hotlinking is one thing, but proxying is another |
Man, I can't figure out how to get range requests to work. https://learn-svelte-dev-git-range-requests-svelte.vercel.app/assets/media/caminandes-llamigos.jpg works fine, https://learn-svelte-dev-git-range-requests-svelte.vercel.app/assets/media/caminandes-llamigos.mp4 barfs (though if I remove the |
Going to leave it for now, there are more pressing matters to deal with |
closing this as audio elements work fine, and we're no longer using video |
Media elements from third party sites are not loaded. This happens in (non-exhaustive list)
Not sure why - I'm guessing because the web container behaves as if it's a localhost instance running without https, and the sites then refuse to answer.
The text was updated successfully, but these errors were encountered: