前提条件:小程序需要申请成功腾讯视频插件
官方文档 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wxa75efa648b60994b
1.app.json添加
"plugins": {
"tencentvideo": {
"version": "2.0.9",
"provider": "wxa75efa648b60994b"
}
},
2.需要用到页面的.json添加
"usingComponents": {
"txv-video": "plugin://tencentvideo/video"
}
3.wxml如下使用
<txv-video vid="v0020ywhz68" playerid="txv1" autoplay="{{true}}" show-fullscreen-btn="{{false}}" bindended="bindended" style="width: 100%; height: 100%;" />
vid获取方式如下