Closed jelias closed 8 months ago
thanks for reporting. which version of Sveltekit are you running?
does it make any difference how you import mux-video?
see our example here https://github.com/muxinc/elements/blob/main/examples/svelte-kit/src/routes/mux-video/%2Bpage.svelte https://elements-demo-svelte-kit.vercel.app/mux-video
Upon further testing I think it was due to an import issue on my monorepo
But for reference:
"svelte": "^4.2.3",
Reproduce:
Expected behavior: Plays normally
Actual behavior: Player sits empty, network tab shows a cancelled request to fetch the video source.
Notes: I've tried the same code in a code pen and it works fine! Even tried it in the Svelte Repl! All good.
I've also tested the
mux-video
web component on its own and that works completely fine as well. Seems to be something within media-chrome that is causing the bug... Could it be the way it is being mounted with the slot?Just seems to be an issue locally? Which makes it very hard to develop and trust that things are working... Is it possible that I'm being rate limited? What's weird is it works fine on Hot Reload (file save) but not when I refresh the browser.
Svelte Repl: https://svelte.dev/repl/0cfcb095cdf643868026c818e64bb6b5?version=4.2.8 CodePen: https://codepen.io/jelias/pen/PoLGLRx?editors=1000
Current workaround: Use the
src
attribute withmux-video
Same code, running locally: