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: hide error dialog on playback recovery #1065

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luwes
Copy link
Collaborator

@luwes luwes commented Jan 31, 2025

this change hides the error dialog when playback recovers (playing event fires and media state indicates playing).

@luwes luwes self-assigned this Jan 31, 2025
@luwes luwes requested review from heff and a team as code owners January 31, 2025 20:48
Copy link

vercel bot commented Jan 31, 2025

@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

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.51%. Comparing base (3ea80df) to head (8d70d0a).
Report is 154 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
- Coverage   78.55%   77.51%   -1.05%     
==========================================
  Files          59       51       -8     
  Lines       11080    12335    +1255     
  Branches        0      726     +726     
==========================================
+ Hits         8704     9561     +857     
- Misses       2376     2746     +370     
- Partials        0       28      +28     

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

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.

👍 Feel free to merge but one question about the necessity of isMediaPlaying.

@@ -2,6 +2,10 @@ import { TextTrackKinds, TextTrackModes } from '../constants.js';
import { getTextTracksList, updateTracksModeTo } from '../utils/captions.js';
import { TextTrackLike } from '../utils/TextTrackLike.js';

export const isMediaPlaying = (media) => {
return !media.paused && !media.ended && media.readyState > 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this? None of these should ever be false when the playing event is fired.

@heff
Copy link
Collaborator

heff commented Feb 2, 2025

For <mux-video> we still need to/are planning to implement a warning API for non-fatal errors, right?

Copy link

vercel bot commented Feb 4, 2025

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

Name Status Preview Comments Updated (UTC)
media-chrome-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 5:14pm

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.

2 participants