1***@qq.com
1***@qq.com
  • 发布:2021-04-23 14:35
  • 更新:2021-04-23 16:55
  • 阅读:1479

【报Bug】使用video的getVideoInfo问题

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: window7

HBuilderX类型: 正式

HBuilderX版本号: 3.1.10

手机系统: Android

手机系统版本号: Android 9.0

手机厂商: 华为

手机机型: FJH5

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
uni.chooseVideo({  
                            count: 1,  
                            sourceType: ['camera'],  
                            maxDuration: 10,  
                            success: res => {  
                                console.log(res)  
                                uni.getVideoInfo({  
                                    src:res.tempFilePath,  
                                    success: res => {  
                                        console.log(res)  
                                    },  
                                    fail: err => {  
                                        console.log(err)  
                                    }  
                                })  
                                // resolve([res.tempFilePath])  
                            },  
                            fail:err=>{  
                                reject();  
                            }  
                        });

操作步骤:
                         uni.chooseVideo({  
                            count: 1,  
                            sourceType: ['camera'],  
                            maxDuration: 10,  
                            success: res => {  
                                console.log(res)  
                                uni.getVideoInfo({  
                                    src:res.tempFilePath,  
                                    success: res => {  
                                        console.log(res)  
                                    },  
                                    fail: err => {  
                                        console.log(err)  
                                    }  
                                })  
                                // resolve([res.tempFilePath])  
                            },  
                            fail:err=>{  
                                reject();  
                            }

预期结果:

1

实际结果:

1

bug描述:

使用getVideoInfo的api时报TypeError: uni.getVideoInfo is not a function;
是在app里使用的;
请问这个是什么问题?

2021-04-23 14:35 负责人:无 分享
已邀请:
雨夜敬清秋

雨夜敬清秋

文档里说 uni.getVideoInfo 在 app 端的 3.1.10+ 支持

  • 1***@qq.com (作者)

    3.1.2.20210206 我这版本好像支持吧,但是不行

    2021-04-23 17:29

  • 雨夜敬清秋

    回复 1***@qq.com: 3.1.10+才支持啊,你这个版本肯定不支持啊

    2021-04-23 17:37

  • 雨夜敬清秋

    回复 1***@qq.com: 最新的正式版是3.1.9,最新的alpha版是3.1.10,你可以用这个最新的alpha试试

    2021-04-23 17:38

  • 1***@qq.com (作者)

    回复 雨夜敬清秋: 好的,谢谢大佬 我试试

    2021-04-23 18:01

  • 1***@qq.com (作者)

    回复 雨夜敬清秋: 现在最新的正式版本3.1.11.20210423,我更新了,但还是存在这样的问题,是这版本还有这bug吗,但hx更新内容中写着已支持。

    2021-04-24 10:42

  • 雨夜敬清秋

    回复 1***@qq.com: 那就是bug,写个简单的demo上传,提bug

    2021-04-24 11:19

  • 1***@qq.com (作者)

    回复 雨夜敬清秋: 好的

    2021-04-24 11:22

该问题目前已经被锁定, 无法添加新回复