Open K7cl opened 5 years ago
额,duration这种懒的话,给个整数秒*1000就行了啊
Seek problem is usually caused by lack of keyframes
table in onMetaData
structure.
If duration
field has been existed in the metadata of flv file, it will be not necessary to fill it manually in MediaDataSource
again.
Seek problem is usually caused by lack of
keyframes
table inonMetaData
structure.If
duration
field has been existed in the metadata of flv file, it will be not necessary to fill it manually inMediaDataSource
again.
flvPlayer.mediaInfo.hasKeyframesIndex false
这说明我需要设置keyframes
?请问关于设置keyframes
有相关技术文档参考吗?缺少keyframes
属于视频本身的问题还是网页代码的?
duration
恐怕在我的flv文件中没有,如果我不填写duration
就会出现类似直播一样的不可移动的进度条。有什么快捷的方法来设置duration
吗?
lazyLoad: false
or fill the flv file meta
You can use tool like flvmeta to inject required onMetaData, including both duration and keyframes. https://github.com/noirotm/flvmeta
请教两个问题,我有一个几个小时的FLV视频,并非直播,用flv.js时duration如何给出?不填写duration貌似不能跳进跳退。如何可以快速得出精确到毫秒要求的视频时长。另外,我发现大幅度跳进时会卡住,例如一个5个小时的视频我开始播放后直接调到2小时处会一直加载很久也没反应,经测试有时跳几分钟没事,加载一会就开始播放,跳十几分钟以上就会卡住不停地加载,有时候几分钟就卡住。 我的代码如下,其中duration是估计的: if (flvjs.isSupported()) { var videoElement = document.getElementById('videoElement'); var flvPlayer = flvjs.createPlayer({ type: 'flv', url: 'test.flv', duration:17000000, hasAudio:true, hasVideo:true, isLive:false, filesize:5648598423, cors:true }); flvPlayer.attachMediaElement(videoElement); flvPlayer.load(); }