用的云点播sdk https://cloud.tencent.com/document/product/266/18177
VodUploader.start({
mediaFile: videoFile, //必填,把chooseVideo回调的参数(file)传进来
getSignature: getSignature, //必填,获取签名的函数
mediaName: fileName, //选填,视频名称,强烈推荐填写(如果不填,则默认为“来自微信小程序”)
coverFile: coverFile, // 选填,视频封面
success: function(result) {
console.log('success');
console.log(result);
},
error: function(result) {
console.log('error');
console.log(result);
wx.showModal({
title: '上传失败',
content: JSON.stringify(result),
showCancel: false
});
},
progress: function(result) {
console.log('progress');
console.log(result);
},
finish: function(result) {
console.log('finish');
console.log(result);
wx.showModal({
title: '上传成功',
content: 'fileId:' + result.fileId + '\nvideoName:' + result.videoName,
showCancel: false
});
}
});
好家伙,你这至少走到失败了,我真机调试的时候就progress 成功了一次,finish和error都没调用,然而用开发者工具就成功了,简直离谱
这是真机调试的:
这是开发者工具的:
难道就是因为合法域名的问题吗,但我真机调试时有勾选这个啊
同问
请问解决了么?