收藏
回答

MediaContainer.export() 不生效?

调用MediaContainer.export(),没有返回url或者啥的,success和fail都没生效

机型华为mate40pro

代码如下:

        const mc = wx.createMediaContainer()
        mc.extractDataSource({
            source: ts.data.currentVidUrl,
            success(r1){
                console.log(r1)
                mc.removeTrack(r1.tracks[0])
                mc.export({
                    success(res) => {
                        // 拿到导出之后的视频
                        console.log("导出视频:", res.tempFilePath);
                        mc.destroy();
                    },
                    fail(res) => {
                        console.log("导出失败");
                        mc.destroy();
                    }
                })
                console.log(mc)
            },
            fail(r1){
                console.log("extractDataSource fail")
                console.log(r1)
                mc.destroy();
            }
        })


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容