提交 8d798521 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix: vue3 app 端 uni.getVideoInfo 成功失败回调不执行问题

上级 28046189
......@@ -12,17 +12,17 @@ export const getVideoInfo = <API_TYPE_GET_VIDEO_INFO>defineAsyncApi(
(options, { resolve, reject }) => {
plus.io.getVideoInfo({
filePath: options.src,
success: (data: any) => {
return {
orientation: data.orientation,
type: data.type,
duration: data.duration,
size: data.size,
height: data.height,
width: data.width,
fps: data.fps || 30,
bitrate: data.bitrate,
}
success: (videoInfo) => {
resolve({
orientation: videoInfo.orientation,
type: videoInfo.type,
duration: videoInfo.duration,
size: videoInfo.size,
height: videoInfo.height,
width: videoInfo.width,
fps: videoInfo.fps || 30,
bitrate: videoInfo.bitrate,
})
},
fail: warpPlusErrorCallback(reject),
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册