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: clean up media-time-display conditions for duration vs. seekable… #850

Merged

Conversation

cjpillsbury
Copy link
Collaborator

…End usage (display and aria label).

Mostly relevant for "DVR" cases.

@cjpillsbury cjpillsbury requested review from heff and a team as code owners March 11, 2024 18:16
Copy link

vercel bot commented Mar 11, 2024

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

A member of the Team first needs to authorize it.

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 72.34%. Comparing base (3ea80df) to head (76f8431).
Report is 27 commits behind head on main.

Files Patch % Lines
src/js/media-time-display.js 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #850      +/-   ##
==========================================
- Coverage   78.55%   72.34%   -6.22%     
==========================================
  Files          59       79      +20     
  Lines       11080    15427    +4347     
==========================================
+ Hits         8704    11160    +2456     
- Misses       2376     4267    +1891     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

vercel bot commented Mar 11, 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 Mar 11, 2024 10:35pm
media-chrome-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 10:35pm
media-chrome-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 10:35pm

Copy link
Collaborator

@heff heff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't honestly understand what the specific problem was. Maybe Infinity was sneaking through and causing problems? But it looks like a non problematic change.

@@ -50,7 +55,12 @@ const DEFAULT_MISSING_TIME_PHRASE = 'video not loaded, unknown time.';
const updateAriaValueText = (el) => {
const currentTime = el.mediaCurrentTime;
const [, seekableEnd] = el.mediaSeekable ?? [];
const endTime = el.mediaDuration || seekableEnd;
let endTime;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We check for endTime == null later on, which makes me feel like this should now either default to null, or we should check for undefined or !endTime later.

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