Skip to content

Android 获取视频信息 封面图片 视频缩略图 缩略图信息

插件 ID: 25515
来源: https://ext.dcloud.net.cn/plugin?id=25515
Android 获取视频 获取视频信息 封面图片 视频缩略图 缩略图信息


更新记录

                                                    1.0.0(2025-10-22)

初始化

平台兼容性

uni-app(3.6.11)

| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 | | | √ |

  • |
  • |
  • | √ | √ | 5.0 |
  • |
  • | | | 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 | | |
  • |
  • |
  • |
  • |
  • |
  • |
  • |
  • |
  • |
  • |
  • |
  • | |

uni-app x(3.6.11)

| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 | | |

  • |
  • | 5.0 |
  • |
  • |
  • | |

其他

| 多语言 | 暗黑模式 | 宽屏模式 | | | √ | √ | √ | |

xtf-videohelper

uniappx

import {onGetVideoImage,VideoData, VidoBack} from "@/uni_modules/xtf-videohelper"
var that=this;
uni.chooseVideo({
    success:function(res){
        console.log(res);
        onGetVideoImage({
                path:res.tempFilePath,
                success:function(r:VidoBack){
                    console.log(r)
                    that.img=r.img!;
                }
        })
    }
})

uniapp

import {onGetVideoImage} from "@/uni_modules/xtf-videohelper"
var that=this;
uni.chooseVideo({
    success:function(res){
        console.log(res);
        onGetVideoImage({
                path:res.tempFilePath,
                success:function(r){
                    console.log(r)
                    that.img=r.img!;
                }
        })
    }
})
export type VideoData={
    path:string,// 视频路径
    time?:number,// 视频帧
    suofang?:number,// 图片缩放比例 默认100
    success:(path:VidoBack)=>void,// 返回数据
}
export type VidoBack={
    width?:number,//宽带
    height?:number,// 高度
    duration?:number,// 时长
    img?:string,// 返回图片
    rotation?:number,// 方向
}

开发文档

UTS 语法UTS API插件UTS uni-app兼容模式组件UTS 标准模式组件Hello UTS

MIT Licensed