Closed cjpillsbury closed 8 months ago
@cjpillsbury is attempting to deploy a commit to the Mux Team on Vercel.
A member of the Team first needs to authorize it.
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
c9a6980
) 78.63% compared to head (96ae025
) 78.63%.
Files | Patch % | Lines |
---|---|---|
src/js/controller.js | 70.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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 | Jan 18, 2024 8:39pm |
media-chrome-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 18, 2024 8:39pm |
While
defaultsubtitles
and user preference subtitles worked for simple cases, there were various async considerations that were causing issues, including e.g.autoplay
. This PR updates the logic to be potentially less efficient but more reflective of dev + user preferences and avoids some odd state mismatch possibilities that could result from the prior implementation.Example: Consider cases where the developer has enabled
defaultsubtitles
. Let's say my navigator languages includes English, and my local storage preferred language is Japanese. If the first track asynchronously added is Swedish, none of my subtitle language prefs will match, so I'll pick the Swedish track to show. Then, an English track is added asynchronously. I'll end up here again, and, although the "most preferred" language is Japanese, I'll update the showing subtitle track to the English one, since it's more reflective of the user's preferences/environment than Swedish. Finally, a Japanese track is added, so I'll end up selecting that one.NOTE: This code could be further optimized to still bail if the current selected showing track is the same as the one that will be selected, but I'd rather hold off unless/until that becomes a real concern (unless folks feel strongly).
To smoke test, use https://media-chrome-9gxm13m21-mux.vercel.app/examples/vanilla/media-elements/mux-video.html