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

How to fix Hls.ErrorTypes.MEDIA_ERROR #5904

Open
konogousanda opened this issue Oct 13, 2023 · 2 comments
Open

How to fix Hls.ErrorTypes.MEDIA_ERROR #5904

konogousanda opened this issue Oct 13, 2023 · 2 comments

Comments

@konogousanda
Copy link

konogousanda commented Oct 13, 2023

What do you want to do with Hls.js?

Hls.js does not request any data when gets Hls.ErrorTypes.MEDIA_ERROR, then the screen went black.
The message is "Playhead still not moving while enough data buffered @37.961094 after 3 nudges".
I don't kown the reason and can't find a solution.
version: 1.4.6

code

image

error

{
  "type": "mediaError",
  "details": "bufferStalledError",
  "error":
    {
      "message": "Playhead still not moving while enough data buffered @37.961094 after 3 nudges",
      stack:"Error: Playhead still not moving while enough data buffered @37.961094 after 3 nudges at GapController._tryNudgeBuffer (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:13099:21) at GapController._tryFixBufferStall (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:12984:12) at GapController.poll (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:12962:10) at StreamController.checkBuffer (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:13737:21) at StreamController.onTickEnd (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:13249:10) at StreamController.doTick (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:13245:10) at StreamController.tick (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:6497:12) at StreamController.fragBufferedComplete (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:7503:10) at StreamController.onFragBuffered (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:13689:10) at EventEmitter2.emit (http://localhost:3100/node_modules/.vite/deps/hls__js.js?v=ef946d71:12512:29)",
    },
  "fatal": true,
}

What have you tried so far?

No response

@konogousanda konogousanda added Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Question labels Oct 13, 2023
@robwalch
Copy link
Collaborator

Please include console logs so that we can determine the reason for the stall.

Stalls generally are related to network conditions or an issue with the HLS asset. The player should recover on its own when network condition are adequate.

Calling recoverMediaError is usually not the best action to take for "bufferStalledError" events.

@robwalch robwalch added Duplicate and removed Question Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Oct 13, 2023
@robwalch
Copy link
Collaborator

robwalch commented Oct 13, 2023

Hi @konogousanda,

The message is "Playhead still not moving while enough data buffered @37.961094 after 3 nudges".

I think that you are experiencing the same problem described in #5873:

Increase nudgeMaxRetry to a large value so the player does not escalate stall nudges to fatal. This will be fixed in v1.5.0 with #5879:

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