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 HLS error details #627

Closed
naheller opened this issue Apr 19, 2019 · 2 comments
Closed

Improve HLS error details #627

naheller opened this issue Apr 19, 2019 · 2 comments

Comments

@naheller
Copy link

Current Behavior

HLS errors logged by the ReactPlayer are just the string "hlsError"

Expected Behavior

HLS errors logged by the ReactPlayer are more verbose, describing the nature of the error to allow for better troubleshooting

Steps to Reproduce

  1. Implement ReactPlayer component with onError={e => console.log(e)}
  2. Encounter an HLS Error
  3. View log in console as the string "hlsError"
@cookpete
Copy link
Owner

onError gets fired with 4 params when playing HLS files. The second of which is an error data object:

https://github.com/CookPete/react-player/blob/f1ba67a7e534ae9f1e9934469eec7ef334f80791/src/players/FilePlayer.js#L129-L131

More info on the data object here: https://github.com/video-dev/hls.js/blob/master/docs/API.md#fifth-step-error-handling

You also get given the HLS instance and the HLS global, for things like

if (data.details === Hls.ErrorDetails.FRAG_LOAD_ERROR) {
  // ...
}

@yurguis
Copy link

yurguis commented Jun 12, 2019

@cookpete I was using v1.5.0 and catching hlsErrors just fine but then I upgrade to latest (v1.11.0) I am getting undefined for all 3 params that you mention in your previous post. So onError is just giving me hlsError string as @naheller described.
Is there something extra that we should do in order to catch these hls errors?

Edit: I just tried different versions and from v1.10 up I get no errors, v1.9.0 reports hlsErrors fine.

albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
philip-luther added a commit to philip-luther/react-player that referenced this issue Nov 22, 2024
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

No branches or pull requests

3 participants