-
-
Notifications
You must be signed in to change notification settings - Fork 432
HTML Video failing to load in Safari #478
Comments
No Safari here to check, but: In if (event.request.method !== 'GET' || event.request.headers.has('range')) return; Hopefully this will make the service worker not try to cache (or serve from cache) any of the range requests that safari makes. |
@pngwn suggested |
Yeah probably. Even without the weird Safari behavior, there's probably just about only confusion to be gained by cache range requests. Having that as the default sounds good. Everything in |
Updated the official template as I described above, and closing this issue. Thanks! |
@Conduitry look what I just came across, could be helpful perhaps? https://philna.sh/blog/2018/10/23/service-workers-beware-safaris-range-request/ |
Oh neat, I guess it is possible to get service workers to respond with partial content! I haven't looked at the implementation too closely, but that might be a nice-to-have for Sapper, apart from the Safari video thing. |
Hello,
I'm running into an issue where html video is failing to play seemingly due to the service worker caching. My use case is that i'm pulling in html from a wordpress api and in the received html is a video. That video fails to play on safari more often than not. Seems to work in Chrome a lot more reliably.
After some trouble shooting between @pngwn and myself via discord @pngwn found that commenting out the last block of code enables the video to play:
Not wanting to lose this caching feature I thought it best to flag it here and link to the test repo for further inspection.
https://github.com/matt3224/vidtest.git
The text was updated successfully, but these errors were encountered: