videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

JS exceptions when playing m3u8 video streams #1529

Open bettysteger opened 4 months ago

bettysteger commented 4 months ago

Description

Our users are using Android 10/13 with the Browsers Chrome Mobile 119 or Samsung Internet 25.0. And the HLS stream is sometimes stuck or not playing at all. Internet Connection is fast - so that's not the problem!

Our bug tracker (Sentry), noticed a few exceptions:

  1. Cannot read properties of null (reading 'type') TypeError .onDone(video.js/dist/video.es) ./node_modules/video.js/dist/video.es.js in .onDone at line 41286:28 ./node_modules/video.js/dist/video.es.js in transmuxer.onerror at line 40755:5

  2. Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer'). InvalidStateError getBody(@videojs/xhr/lib/index) ./node_modules/@videojs/xhr/lib/index.js in getBody at line 149:18 ./node_modules/@videojs/xhr/lib/index.js in loadFunc at line 219:15

  3. For the 1st one i checked the code and it is calling the onDone method with null which causes the error:

    const handleError = () => {
      const error = {
        message: 'Received an error message from the transmuxer worker',
        metadata: {
          errorType: videojs.Error.StreamingFailedToTransmuxSegment,
          segmentInfo: segmentInfoPayload({
            segment
          })
        }
      };
      onDone(null, error);
    };

    Of course i need to find out why these error are occurring in the first place, but getting rid of the JS exceptions and handling the errors correctly would be nice!

    Reduced test case

    https://codepen.io/bettyst/pen/KKjMbMX?editors=1000

    Steps to reproduce

    1. Use a Samsung Smartphone
    2. Open up Samsung Internet Browser
    3. Open up the test case URL
    4. Check if the video is streaming

    Errors

    No response

    What version of Video.js are you using?

    8.16.1

    Video.js plugins used.

    No response

    What browser(s) including version(s) does this occur with?

    Samsung Internet 25.0

    What OS(es) and version(s) does this occur with?

    Android 10

    welcome[bot] commented 4 months ago

    👋 Thanks for opening your first issue here! 👋

    If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

    welcome[bot] commented 4 months ago

    👋 Thanks for opening your first issue here! 👋

    If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.