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

Improve Error Handling for "attachMedia" with Null #6463

Open
fullmooooon opened this issue May 30, 2024 · 1 comment
Open

Improve Error Handling for "attachMedia" with Null #6463

fullmooooon opened this issue May 30, 2024 · 1 comment

Comments

@fullmooooon
Copy link

Is your feature request related to a problem? Please describe.

When using HLS.js, I encountered a situation where calling hls.attachMedia(null) did not result in any error being logged to the console. This lack of feedback led to confusion and wasted time, as I spent two hours troubleshooting without clear guidance.

Describe the solution you'd like

It would be beneficial to improve error handling in HLS.js to provide more informative feedback when attachMedia is called with a null parameter. This could include logging an error message to the console indicating that a valid media element is required as a parameter.

Additional context

As a user of HLS.js, encountering unexpected behavior without adequate error reporting can be frustrating and time-consuming. Clearer error messages would greatly improve the developer experience and help users diagnose issues more efficiently.

@fullmooooon fullmooooon added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels May 30, 2024
@robwalch robwalch added Enhancement and removed Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels May 30, 2024
@robwalch
Copy link
Collaborator

We'd accept a change that warns when attachMedia is passed a null or undefined media argument. Can you submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants