Skip to content

fix: respect hls.js fatal error flag if available#1099

Merged
luwes merged 2 commits intomuxinc:mainfrom
luwes:fix-fatal-errors
Apr 9, 2025
Merged

fix: respect hls.js fatal error flag if available#1099
luwes merged 2 commits intomuxinc:mainfrom
luwes:fix-fatal-errors

Conversation

@luwes
Copy link
Contributor

@luwes luwes commented Apr 9, 2025

fixes an issue where playback is not broken yet but the player throws a fatal error making the error dialog show up while the video is playing underneath.

@luwes luwes self-assigned this Apr 9, 2025
@vercel
Copy link

vercel bot commented Apr 9, 2025

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

A member of the Team first needs to authorize it.

@luwes luwes marked this pull request as ready for review April 9, 2025 20:23
@luwes luwes requested a review from a team as a code owner April 9, 2025 20:23
@vercel
Copy link

vercel bot commented Apr 9, 2025

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

Name Status Preview Comments Updated (UTC)
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 8:32pm
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 8:32pm
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 8:32pm
elements-demo-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 8:32pm

const mediaErrorCode = MediaError.MEDIA_ERR_NETWORK;
const mediaError = new MediaError(message, mediaErrorCode, true, context);
// Being offline is not immediately a fatal error for playback.
const mediaError = new MediaError(message, mediaErrorCode, false, context);
Copy link
Contributor

@cjpillsbury cjpillsbury Apr 9, 2025

Choose a reason for hiding this comment

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

💪. There may be some (non hls.js) places where it does entail a fatal error... We can treat that as a followup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool!

}

const mediaError = new MediaError('', mediaErrorCode, true);
const mediaError = new MediaError('', mediaErrorCode, fatal ?? true);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! treating fatal as an override of default 👌

Copy link
Contributor

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

one concern about the offline assumptions, but otherwise this lgtm. Also, even if the changes result in some things not being marked as fatal when they should be, you were right that the current code is arguably overly presumptuous in the other direction (at least given the possibilities of retries).

@luwes luwes merged commit 6350a9b into muxinc:main Apr 9, 2025
8 of 11 checks passed
@luwes luwes deleted the fix-fatal-errors branch April 9, 2025 22:01
@github-actions github-actions bot mentioned this pull request Apr 9, 2025
@github-actions github-actions bot mentioned this pull request Apr 10, 2025
luwes pushed a commit that referenced this pull request Apr 10, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>@mux/mux-audio: 0.15.7</summary>

##
[0.15.7](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.15.6...@mux/mux-audio@0.15.7)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/mux-audio-react: 0.15.7</summary>

##
[0.15.7](https://github.com/muxinc/elements/compare/@mux/mux-audio-react@0.15.6...@mux/mux-audio-react@0.15.7)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/mux-player: 3.3.4</summary>

##
[3.3.4](https://github.com/muxinc/elements/compare/@mux/mux-player@3.3.3...@mux/mux-player@3.3.4)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/mux-video bumped from 0.25.0 to 0.25.1
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/mux-player-react: 3.3.4</summary>

##
[3.3.4](https://github.com/muxinc/elements/compare/@mux/mux-player-react@3.3.3...@mux/mux-player-react@3.3.4)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/mux-player bumped from 3.3.3 to 3.3.4
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/mux-video: 0.25.1</summary>

##
[0.25.1](https://github.com/muxinc/elements/compare/@mux/mux-video@0.25.0...@mux/mux-video@0.25.1)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/mux-video-react: 0.25.1</summary>

##
[0.25.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.25.0...@mux/mux-video-react@0.25.1)
(2025-04-10)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.6 to 0.28.7
</details>

<details><summary>@mux/playback-core: 0.28.7</summary>

##
[0.28.7](https://github.com/muxinc/elements/compare/@mux/playback-core@0.28.6...@mux/playback-core@0.28.7)
(2025-04-10)


### Bug Fixes

* respect hls.js fatal error flag if available
([#1099](#1099))
([6350a9b](6350a9b))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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