<view class="intro">欢迎使用代码片段,可在控制台查看代码片段的说明和文档</view>
<view bindtap="clickTxPlayer">
<player-component vid="m33378cg3uv"></player-component>
</view>
const app = getApp()
const store = requirePlugin('player')
Page({
data: {
isPlay:true
},
onLoad() {
},
clickTxPlayer(){
console.log(store)
let isPlay = this.data.isPlay;
const player = store.get('tvp');
if(isPlay){
player.pause();
}else{
player.play();
}
this.setData({
isPlay:!isPlay
})
},
})