muxinc / media-chrome

Custom elements (web components) for making audio and video player controls that look great in your website or app.
https://media-chrome.org
MIT License
1.21k stars 62 forks source link

fix(fullscreen): handleMediaUpdated / rootNode race condition #817

Closed luwes closed 7 months ago

luwes commented 7 months ago

fixes https://github.com/epicweb-dev/kcdshop/issues/189

the async logic in handleMediaUpdated was causing rootNode to be undefined when trying to add event listeners.

this bug was only apparent when rapidly connecting / disconnecting media like in many modern JS frameworks

vercel[bot] commented 7 months ago

@luwes is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
media-chrome ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 9:40pm
media-chrome-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 9:40pm
media-chrome-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 9:40pm
codecov[bot] commented 7 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (92d6d7e) 78.50% compared to head (11ef40e) 78.55%. Report is 2 commits behind head on main.

Files Patch % Lines
src/js/media-controller.js 66.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #817 +/- ## ========================================== + Coverage 78.50% 78.55% +0.05% ========================================== Files 59 59 Lines 11094 11080 -14 ========================================== - Hits 8709 8704 -5 + Misses 2385 2376 -9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.