-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: buggy chapter segments rendering #825
Conversation
@luwes is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
mediaEvents: ['loadstart', 'loadedmetadata'], | ||
textTracksEvents: ['addtrack', 'removetrack'], | ||
mediaEvents: ['loadstart'], | ||
textTracksEvents: ['addtrack', 'removetrack', 'change'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added change
as well because it makes sense to re-render when the active chapters track changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool def makes sense to me.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #825 +/- ##
==========================================
- Coverage 78.55% 78.45% -0.11%
==========================================
Files 59 59
Lines 11080 11112 +32
==========================================
+ Hits 8704 8718 +14
- Misses 2376 2394 +18 ☔ View full report in Codecov by Sentry. |
9827396
to
19ca6e2
Compare
const chaptersTrack = media.querySelector('track[kind="chapters"][default][src]'); | ||
chaptersTrack?.addEventListener('load', callback); | ||
}, | ||
mediaUnsetCallback(media, callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol started peeping this before I got pulled away and looks like you anticipated the cleanup concern already. 🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some concerns/tradeoffs with this approach, but we'll address those in a followup.
don't love this but I couldn't get it to work otherwise.