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

news/2024/11/25 3:20:12/

着急的盆友可以直接看下面我的解决办法(大家项目不同,报错原因也可能不同,但是可以试试这个思路),不着急的童鞋可以看看跟我的报错是否一样。
最近项目中才接触m3u8格式的文件,其实相当于是对视频文件记录地址、时长等信息的索引文件,在网上查询说是用videojs来播放,于是下载、引入了videojs,这里不详细描述,可参考网址: # 使用videojs播放 .m3u8格式文件
按照上文链接中的方法,在之前一个demo项目中用的很顺利,正常播放m3u8文件也没报错。但是今天我又新起了一个项目,把之前demo的代码拿过来,发现一样的m3u8播放不了了,报错信息:VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists.
在这里插入图片描述

详细报错信息:(太长不看版)

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:189
handlePlayAnEventVideo @ Event.vue:166
onClick @ Event.vue:31
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.'}
(anonymous) @ video.es.js:228
log2.error @ video.es.js:416
error @ video.es.js:26181
(anonymous) @ video.es.js:54564
data.dispatcher @ video.es.js:2311
trigger @ video.es.js:2447
EventTarget$2.trigger @ video.es.js:2850
blacklistCurrentPlaylist @ video.es.js:52252
getCodecsOrExclude_ @ video.es.js:52704
tryToCreateSourceBuffers_ @ video.es.js:52807
updateCodecs2 @ video.es.js:51804
data.dispatcher @ video.es.js:2311
trigger @ video.es.js:2447
EventTarget$2.trigger @ video.es.js:2850
handleTrackInfo_ @ video.es.js:45742
handleSegmentBytes2 @ video.es.js:42405
segmentFinish2 @ video.es.js:42619
(anonymous) @ video.es.js:42661
(anonymous) @ video.es.js:42136
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
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:189
handlePlayAnEventVideo @ Event.vue:166
onClick @ Event.vue:31
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:366
video.es.js:42680 Uncaught TypeError: Cannot read properties of null (reading 'aborted')at MockXMLHttpRequest.<anonymous> (video.es.js:42680:17)at MockXMLHttpRequest.dispatchEvent (mock.js:8472:25)at XMLHttpRequest.handle2 (mock.js:8304:19)

最后发现罪魁祸首是引入了mock: import ‘./mock’;
在这里插入图片描述

把这一行注释掉就可以了:
在这里插入图片描述

原理我还没搞明白,理论上来说引入了没有使用应该是没有影响的,但是我这确实报错了。
大家不同的项目引入的组件不同,如果遇到同款问题,建议把可疑的引入先注释掉看看情况。
因为这个报错,各种中网外网查咋回事,浪费了我一天时间。。。


http://www.ppmy.cn/news/479975.html

相关文章

国产单路AHDRX芯片XS9950,替代TP9950

国产单路AHDRX芯片XS9950&#xff0c;单通道模拟复合视频解码芯片方案&#xff0c;替代TP9950 XS9950 是单通道模拟复合视频解码芯片方案&#xff0c;支持 HDcctv 高清协议和 CVBS 标清协议&#xff0c;最高支持单路 1080P30fps。XS9950将接收到的高清模拟复合视频信号经过模数…

99版人民币收藏价值分析

一、99版人民币剖析 1、票面 99100&#xff1a;票面棕红色;横黑竖蓝&#xff0c;两组数码&#xff0c;两种色彩&#xff08;05100一组数码&#xff0c;前2位数棕黄色&#xff0c;后6位数黑色&#xff0c;双色组码递减式排列&#xff09;;票面无面额水印100;无面额拼音YUAN。 99…

SpringMVC 源码分析之 DispatcherServlet

SpringMVC 源码分析之 DispatcherServlet FrameworkServletserviceprocessRequestLocaleContext 和 RequestAttributesLocaleContextRequestAttributes 事件发布 DispatcherServletdoService代码分析 doDispatch参数含义具体的处理逻辑&#xff1a; processDispatchResult 引用…

Python基础语法第一章、认识Python

一、计算机基础概念 1.1什么是计算机? 很多老一辈的人, 管下面这个叫做计算机. 然鹅, 它只是 "计算器", 和计算机是有很大区别的. 现在我们所说的计算机, 不光能进行算术运算, 还能进行逻辑判断, 数据存储, 网络通信等等功能, 以至于可以自动的完成非常复杂的工作…

IDEA远程调试kubernetes环境中的容器应用(Java应用)

应用场景: IDEA远程调试kubernetes环境中的容器应用(Java应用)应用场景:Java开发的项目在本地运行正常,然后将容器运行方式的项目发布到远端服务器上线运行后,出现了异常情况,此时频繁去修改代码发布镜像进行问题验证,将耗费较大的时间成本。 为了提高问题定位和代码调…

你的仓库VS别人家的仓库,有什么不同?

导读&#xff1a; 近年来&#xff0c;随着新技术的蓬勃发展&#xff0c;企业的仓储管理水平大大提高&#xff0c;PDA、RFID、AGV、立体仓库、智能分拣线等各项新技术的应用层出不穷。然而&#xff0c;着眼于制造型企业&#xff0c;却发现仍有许多仓库处在比较原始、传统、粗放…

定时任务最简单的3种实现方法

定时任务在实际的开发中特别常见&#xff0c;比如电商平台 30 分钟后自动取消未支付的订单&#xff0c;以及凌晨的数据汇总和备份等&#xff0c;都需要借助定时任务来实现&#xff0c;那么我们本文就来看一下定时任务最简单的几种实现方式。 TOP 1&#xff1a;Timer Timer 是…

unity鼠标滚轮实现镜头拉近拉远

float fieldView Camera, main. fieldOfView:fieldView - Input.GetAxis("Mouse ScrollWheel")*5f:fieldView Mathf.Clamp(fieldView,50.80):Camera.main.fieldOfView fieldView:将以上代码放在Updata里面即可实现&#xff0c;调整数值也可以实现速度不同运行。