Chromium works great, but Safari? #113
Replies: 2 comments
-
|
I think the analysis / proposal isn't quite correct here and/or possibly concerns on older version.
Trying with Clapshot 0.9.2 on Bookworm through Safari 26.2 on MacOS 15.7.3, I managed to partially reproduce the issue though: In most cases - but not always - the video image didn't intiailly come up, and playback area remained cyan (background only). Play button usually didn't bring it up either. However:
=> it seems Safari is in fact correctly streaming the file, but there's something odd about (not) showing the video. This means hypotheses about CORS and the other stuff probably aren't the issue - at least not anymore, since commit 7199c8f |
Beta Was this translation helpful? Give feedback.
-
|
Hi, yeah I am running 0.9.2 (Safari 26.2) and i am only able to scroll the video frame by frame. Cyan background happening too, but no Audio coming out or seeking option not working either.
Let me know if I can help you beta test this fix (i am not a programmer but I love this project)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I tried debugging Safari experience (the video cannot be played). The only thing that I could make it work is frame by frame viewing. Can anybody help with this? This is what my LLM analysed.
The current implementation of the Clapshot video player utilizes a custom JavaScript-based streaming/fetch engine that is incompatible with Desktop Safari’s security model when behind a reverse proxy (specifically Cloudflare Tunnels). While the player functions correctly on Chrome and Firefox, Safari interprets the rapid-fire "Byte-Range" fetch requests as a security/CORS violation, triggering a persistent AbortError and halting playback.
The issue is driven by three specific architectural choices in the repository:
Custom Fetch Logic: The player attempts to manage video chunks via fetch() or XHR instead of a standard
Missing Polyfills: The codebase relies on TouchEvent for player logic, which is undefined in Desktop Safari, leading to a ReferenceError that crashes the "Play" function loop.
CORS Conflict: The presence of crossorigin="anonymous" on the video tag forces a strict preflight check that frequently fails or times out when served through a tunnel, resulting in Unhandled Promise Rejection: AbortError.
Network Tab: Repeated video.mp4 requests marked in red with a "Canceled" or "Aborted" status.
Console Logs: Persistent AbortError: The operation was aborted and ReferenceError: Can't find variable: TouchEvent.
User Experience: Video remains black/stuck. Manual "stepping" through frames works (bypassing the JS loop), but the "Play" button does nothing.
To resolve this for the Safari community, the following changes are recommended for the .vue or .js player components:
Direct Source Assignment: Bypass URL.createObjectURL(blob) for Safari users and point the src directly to the asset URL.
Strip Security Attributes: Remove crossorigin and preload="auto" to allow the native Safari hardware decoder to handle the stream directly.
Global Polyfill: Add window.TouchEvent = window.TouchEvent || function() {}; to the entry point to prevent desktop-environment crashes.
Beta Was this translation helpful? Give feedback.
All reactions