videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38k stars 7.45k forks source link

(CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists #7886

Open DetectiveBox opened 2 years ago

DetectiveBox commented 2 years ago

Description

when i used videojs to play m3u8, there are some errors. It notes (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists.

Reduced test case

No response

Steps to reproduce

Here is the code

getVideo(item.videoUrl);
  const getVideo = (url: string) => {
    const div: any = document.getElementById('videoDiv');
    div.innerHTML = '';
    div.innerHTML = `<video id="videoPlayer" class="video-js" style="width: 300px; height: 180px;"></video>`;
    const options = {
      autoplay: true, 
      controls: true,
      // errorDisplay: false,
      // muted: true,
      sources: [
        {
          src: url,
          type: 'application/x-mpegURL', 
        },
      ],
    };
    videojs(`videoPlayer`, options, function onPlayerReady() {});
  };

Errors

video.es.js:42728 Uncaught TypeError: Cannot read properties of null (reading 'aborted')
    at MockXMLHttpRequest.<anonymous> (video.es.js:42728:17)
    at MockXMLHttpRequest.dispatchEvent (mock.js:8472:25)
    at XMLHttpRequest.handle2 (mock.js:8304:19)
(anonymous) @ video.es.js:42728
dispatchEvent @ mock.js:8472
handle2 @ mock.js:8304
XMLHttpRequest.send (async)
send @ mock.js:8363
_createXHR @ index.js:274
createXHR @ index.js:91
XhrFunction @ video.es.js:31145
mediaSegmentRequest2 @ video.es.js:42899
updateTransmuxerAndRequestSegment_ @ video.es.js:46484
loadSegment_ @ video.es.js:46437
fillBuffer_ @ video.es.js:45391
monitorBufferTick_ @ video.es.js:45348
setTimeout (async)
monitorBuffer_ @ video.es.js:45336
load @ video.es.js:44969
load @ video.es.js:51865
setupFirstPlay @ video.es.js:52008
(anonymous) @ video.es.js:51457
data.dispatcher @ video.es.js:2311
trigger @ video.es.js:2447
EventTarget$2.trigger @ video.es.js:2850
setupInitialPlaylist @ video.es.js:31077
(anonymous) @ video.es.js:31014
callbackWrapper2 @ video.es.js:31121
(anonymous) @ video.es.js:31146
cbOnce @ index.js:104
loadFunc @ index.js:178
dispatchEvent @ mock.js:8476
handle2 @ mock.js:8304
load (async)
open @ mock.js:8315
_createXHR @ index.js:232
createXHR @ index.js:91
XhrFunction @ video.es.js:31145
start2 @ video.es.js:30979
load @ video.es.js:30911
MasterPlaylistController2 @ video.es.js:51226
src @ video.es.js:54538
handleSource @ video.es.js:55121
_Tech.setSource @ video.es.js:9920
Html52 @ video.es.js:19980
loadTech_ @ video.es.js:23207
src_ @ video.es.js:25647
(anonymous) @ video.es.js:25552
setSourceHelper @ video.es.js:10286
setSourceHelper @ video.es.js:10288
(anonymous) @ video.es.js:10026
(anonymous) @ video.es.js:5166
setTimeout (async)
setTimeout2 @ video.es.js:5161
setSource @ video.es.js:10025
handleSrc_ @ video.es.js:25542
src @ video.es.js:25618
MediaLoader2 @ video.es.js:10511
addChild @ video.es.js:4249
handleAdd2 @ video.es.js:4381
initChildren @ video.es.js:4430
Player2 @ video.es.js:22520
videojs @ video.es.js:28339
getVideo @ Event.vue:179
handlePlayAnEventVideo @ Event.vue:156
onClick @ Event.vue:26
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:366
video.es.js:228 VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists. MediaError {code: 3, message: 'Playback cannot continue. No available working or supported playlists.'}

What version of Video.js are you using?

7.20.2

Video.js plugins used.

No response

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

chrome latest

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

windows 10

welcome[bot] commented 2 years 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.

gkatsev commented 2 years ago

Can you provide the stream that you're playing when you experience this issue? Unfortunately, we can't help without one.

video-archivist-bot commented 2 years ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

gkatsev commented 2 years ago

Hm... seems to be working for me in Chrome and Firefox.

DetectiveBox commented 2 years ago

I used it in two projects. One is OK and the other throws the error. The code is same.

paekjm01 commented 2 years ago

Hi,

Has it been resolved? I encountered the same issue. When I used the version 7.8 of videojs worked fine, but recently I upgraded to 7.20, but the same video can't play with the error message " video.es.js:100 VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists. MediaError {code: 3, message: 'Playback cannot continue. No available working or supported playlists.'}".

Any idea?

gkatsev commented 2 years ago

Code 3 basically just means that the video can't be played. Unfortunately, it isn't possible to help without a specific stream to investigate exactly what's causing playback to fail.

paekjm01 commented 2 years ago

@gkatsev, Thank you for prompt response. One weird thing is that there is an encrypted ts file, when we play it using the version 7.10.0 or lower, it worked fine. However any version 7.10.1 or higher, we got an error message below.

" video.es.js:100 VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists. MediaError {code: 3, message: 'Playback cannot continue. No available working or supported playlists.'}".

My questions are

Thank you so much for your support on this.

ghost commented 1 year ago

@paekjm01 How is your video encoded? Is it mpegts or fragmented mp4 aka fmp4? As I'm currently only seeing this issue with fmp4, not with mpegts ... Pretty sure that the issue is somewhere located here.

phloxic commented 1 year ago

@venomone - @paekjm01 talks about a TS file.

muniv11111 commented 1 year ago

http://81.171.17.80:6878/ace/manifest.m3u8?id=ce235921dac95e1da2dd5e54673c2fecb9e806de

same (CODE:3 MEDIA_ERR_DECODE]

could you investigate this stream?

video-archivist-bot commented 1 year ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

Sylry commented 1 year ago

I have this error code with some lists too, with 7.15.4 version

Examples:

video-archivist-bot commented 1 year ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands: