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
});