-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat: use MC media-error-dialog #1014
Conversation
@luwes is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
1e1f24a
to
55f7f40
Compare
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 questions/callouts on the draft
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -18,7 +18,7 @@ | |||
"esModuleInterop": true, | |||
"skipLibCheck": false, | |||
"forceConsistentCasingInFileNames": true, | |||
"typeRoots": ["node_modules/@types", "../../types/media-chrome.d.ts"] |
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.
question(blocking): Why were these types things changed for this PR? This might be right (I'd want to make sure for all the different use cases we have), but unless this is needed for the PR, these changes should be backed out and added to a separate PR.
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.
this was needed to make it build, because the MediaErrorDialog class is imported.
the media-chrome.d.ts file was excluding the types that are now available in the Media Chrome pkg itself
declare module 'media-chrome' {
export class MediaTheme extends HTMLElement {}
export class MediaController extends HTMLElement {
media: HTMLVideoElement;
}
}
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.
Since I wasn't anticipating reviewing this, as long as you're confident this isn't going to break any existing typescript consumers with any of the many setups we've had to fight against in the past, that's fine. Otherwise, there are less risky solutions to your immediate issue of building, albeit also less ideal overall. I'll defer to your judgment here.
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 small callouts and looks like there are some linting errors, but this is def close.
233530f
to
8ca8889
Compare
test page loading a 404 source |
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.
Works for me. 👍
related #1012
requires muxinc/media-chrome#1024
.error
object could be null when the error event is dispatched.this was introduced when we started calling initialize() function deferred in mux-video I believe.
this is fixed by saving the error state each time before we dispatch the error event.
the only thing is doing a console.warn here:
elements/packages/mux-player/src/index.ts
Lines 461 to 465 in 1e1f24a
we can easily do that in playback-core if we want?