elements: Bug: mux-player-react sends hundreds of 0 chunk calls per second until crash or user presses play
Is there an existing issue for this?
- I have searched the existing issues
Which Mux Elements/Packages does this apply to? Select all that apply
mux-player-react
Which browsers are you using?
Chrome
Which operating systems are you using?
macOS
Description
I am using "@mux/mux-player-react": "^1.11.0"
with "next": "v13.4.0"
. When I run locally, my mux video and next app look fine. When I deploy to vercel and look at the console, I see about 100 requests a second against a mux chunk service. It looks like it is seeking the 0th chunk. It will continue to make tens of thousands of calls
Image showing the Chrome network tab with 800+ requests
The second I press the play button, the video will start loading and the chunk requests proceed normally from 0 to however many chunks there are. In other words, pressing play eliminates the issue.
This problem only occurs with signed URLs.
Reduced test case
https://github.com/sharpsteelsoftware1/aob-web/blob/main/app/media/module/components/MediaPlayer.tsx https://github.com/sharpsteelsoftware1/aob-web/blob/main/app/media/[slug]/page.tsx https://adventuresofbubbles.com/media/st-louis-central-station
Steps to reproduce
- Codebase is listed above, please see link
- Go to https://adventuresofbubbles.com/media/st-louis-central-station
- See there are 100+ network calls a second to a Mux endpoint in Chrome network inspector
- Press play and notice that the infinite 0 chunk calls have stopped.
Expected Behavior
The 0th chunk should not be repeat called thousands of times.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (8 by maintainers)
okay thanks @cornwe19 – we have a canary release now with this patch: 1.11.3-canary.0-c45d462
Repro in my fresh-next-app with your playback ID:
Canary build of Mux Player:
We’ll work on getting an official patch release here shortly
@dylanjha Excellent news. The patch does appear to be working for me as well. Thanks!
I a getting the exact same error, both when using mux-player-react and mux-video-react. This indeed work just fine in local, but once published to production the video does not work; it only loads the first second and then it stops, but I can see a growing list of Network requests similar to the one reported above.
Unfortunately I can not “wait until the user plays the video” as I am trying to use the component as a background video which auto plays in loop.
Do you guys know of any workaround for such scenario?
Thank you, that enabled to continue my development process. Great support over there at Mux.