更新记录
1.0.0(2026-11-18)
- 初版:基于腾讯云礼物动画特效 Vap Pro SDK(Android 3.5.0.29003 / iOS 3.5.29005)实现 UTS 组件。
- 支持 License 字符串离线校验、本地 mp4/tcmp4 播放、暂停/继续/停止、循环、静音、倍速、旋转、缩放、跳转、截图、动画信息查询。
- 支持融合动画图片/文字资源替换与融合资源点击事件。
平台兼容性
uni-app(4.72)
| Vue2 |
Vue2插件版本 |
Vue3 |
Vue3插件版本 |
Chrome |
Safari |
app-vue |
app-nvue |
app-nvue插件版本 |
Android |
Android插件版本 |
iOS |
鸿蒙 |
| √ |
1.0.0 |
√ |
1.0.0 |
× |
× |
× |
√ |
1.0.0 |
5.0 |
1.0.0 |
- |
× |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
小红书小程序 |
快应用-华为 |
快应用-联盟 |
| × |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
其他
| 多语言 |
暗黑模式 |
宽屏模式 |
蒸汽模式 |
| × |
× |
√ |
× |
zy-vap-view(Vap Pro 透明视频动画组件)
基于腾讯云视立方「礼物动画特效 Vap Pro SDK」(TCEffectAnimView)的 uni-app 兼容模式 UTS 组件,Android / iOS 双端可用。
使用前必读
- 到 https://tceffect-license.tmf.qq.com/ 免费申请 License 字符串;License 与 Android 包名 / iOS Bundle ID 绑定,不一致会报
-5 / -100202。
- 播放前先调用组件方法
setLicense({ license: '...' }),等待 onLicenseResult 或 onResult(type='setLicense') 返回 code=0。
- 只支持播放本地文件(mp4 / tcmp4);网络素材请先下载到本地。
- Vap Pro 不支持加密素材、软硬解自动切换、后台播放,这些属于企业版能力。
基本用法(nvue)
<zy-vap-view ref="vap" class="vap"
@onResult="onResult" @onPlayStart="onPlayStart" @onPlayEnd="onPlayEnd"
@onPlayError="onPlayError" @onPlayEvent="onPlayEvent"
@onResourceClick="onResourceClick" @onLicenseResult="onLicenseResult" />
this.$refs.vap.setLicense({ license: '你的 License 字符串', logEnabled: true })
this.$refs.vap.startPlay({
path: '/sdcard/Android/data/包名/files/demo.mp4',
config: { codecType: 'TC_MPLAYER', animType: 'AUTO', scaleType: 'FIT_CENTER' }
})
this.$refs.vap.pause()
this.$refs.vap.resume()
this.$refs.vap.setLoop(true)
this.$refs.vap.setRate(1.5)
this.$refs.vap.seek({ time: 3000 })
this.$refs.vap.snapshot()
事件载荷在 nvue 中是 UTS 代理对象,真实字段在 e.detail.dynamicJSONFields,演示页 pages/vap-view/vap-view.nvue 里提供了 unwrapUTS 实现。
方法一览
| 方法 |
说明 |
setLicense(options) |
注册 License 字符串 |
setConfig(options) |
播放配置,须在 startPlay 前调用 |
startPlay(options) / playPath(path) |
播放本地文件 |
pause() / resume() / stop(clearLastFrame) |
播放控制 |
setLoop(bool) / setLoopCount(n) / setMute(bool) / setRate(n) / setDuration(ms) |
播放参数 |
seek({time\|progress}) |
Android time 为毫秒;iOS 内部换算为秒 |
setScaleType(name) / setVideoMode(name) / setRotation(deg) |
画面设置 |
getPlayStatus() / getAnimInfo() / snapshot() |
查询与截图 |
setMixText(options) / setMixImage(options) / requestMixUpdate() |
融合动画资源替换 |
release() |
释放资源(组件卸载时自动调用) |