react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Error with debug and HLS.js

Open MatheusLopesDev99 opened this issue 2 years ago • 0 comments

Hey guys, i'm using the react-player and i having a issue to find the error when happens using the HLS video

Here's the code

The config file:

const config = {
  file: {
    attributes: {
      disablePictureInPicture: true
    },
    tracks: [],
    forceVideo: false,
    forceAudio: false,
    forceHLS: false,
    forceDASH: false,
    hlsOptions: {
      "debug": true,
      "enableWorker": true,
      "lowLatencyMode": true,
      "backBufferLength": 90,
      "startLevel": 1,
      "capLevelToPlayerSize": true
    },
    hlsVersion: "1.2.8",
    capLevelToPlayerSize: true,
    "debug": true,
    "enableWorker": true,
  }
};
<ReactPlayer
        url={webinar?.video}
        controls={false}
        playing={playing}
        width="100%"
        height="100%"
        playsinline
        onEnded={onEnd}
        onProgress={onTimeUpdate}
        onPlay={onPlay}
        onReady={onReady}
        className="player-mp4"
        config={config}
        onError={(event, data, hlsInstance, hlsGlobal) => {
          const error = event.target.error;

          sendLogError({
            autoPlay: true,
            error: {
              code: error?.code,
              message: error?.message,
              event,
              data,
              hlsInstance,
              hlsGlobal
            },
            videoType: "mp4",
            videoUrl: webinar?.video,
            webinar_id: webinar?.webinar_id,
          });
        }}
      />

Isn´t coming to the error that is described in the HLS.js documentation for example:

Hls.ErrorDetails.MANIFEST_LOAD_ERROR

How can I access the exatcly error with the react-player?

MatheusLopesDev99 avatar Oct 25 '23 21:10 MatheusLopesDev99