Skip to content
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

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

luwes
Copy link
Contributor

@luwes luwes commented Feb 15, 2024

don't love this but I couldn't get it to work otherwise.

@luwes luwes self-assigned this Feb 15, 2024
@luwes luwes requested review from heff and a team as code owners February 15, 2024 17:22
Copy link

vercel bot commented Feb 15, 2024

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

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Feb 15, 2024

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 15, 2024 5:43pm
media-chrome-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 5:43pm

mediaEvents: ['loadstart', 'loadedmetadata'],
textTracksEvents: ['addtrack', 'removetrack'],
mediaEvents: ['loadstart'],
textTracksEvents: ['addtrack', 'removetrack', 'change'],
Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

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

Comparison is base (3ea80df) 78.55% compared to head (19ca6e2) 78.45%.
Report is 9 commits behind head on main.

Files Patch % Lines
src/js/controller.js 50.00% 18 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

const chaptersTrack = media.querySelector('track[kind="chapters"][default][src]');
chaptersTrack?.addEventListener('load', callback);
},
mediaUnsetCallback(media, callback) {
Copy link
Collaborator

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. 🔥

Copy link
Collaborator

@cjpillsbury cjpillsbury left a 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.

@luwes luwes merged commit 80c04fc into muxinc:main Feb 16, 2024
5 of 8 checks passed
@luwes luwes deleted the fix-chapter-segs branch February 16, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants