先上图
1.使用方法:
"plugins": {
"tencentvideo": {
"version": "1.3.27",
"provider": "wxxxxxxxxxxxxxxx需要更改"
}
}
2.配置page.json
"usingComponents": {
// #ifdef MP-WEIXIN
"txv-video": "plugin://tencentvideo/video"
// #endif
}
3.布局使用
<template>
<view class="video">
<txv-video vid="你的vid" playerid="txv1"></txv-video>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
page {
background-color: black;
}
.mytext {
color: white;
text-align: center;
height: 80vh;
width: 100%;
display: flex;
justify-content: center;
flex-direction: column;
font-size: 40px;
}
.video {
height: 90vh;
justify-content: center;
flex-direction: column;
display: flex;
}
</style>
4.运行
5.记得配置APPID
完结