收藏
回答

getFrameData()返回null?

let videoContext = wx.createVideoContext(event.currentTarget.id, this); //获取视频上下文

let decoder = wx.createVideoDecoder(); //创建解码器

// 监听解码帧数据

decoder.on('start', (res) => {

console.log('start', res);

decoder.seek(1);

});

function loop() {

console.log(decoder.getFrameData(), "看看");

}

decoder.on('seek', (e) => {

console.log(e, 'seek', "是否触发了");

console.log(decoder.getFrameData(), "看看");

})

decoder.start({

source: res.tempFilePath

});

回答关注问题邀请回答
收藏
登录 后发表内容