微信小程序live-player全屏设置

效果
效果1.jpg
效果2.jpg

wxml


  
    
    直播
  
  
    
      
        观看人数:290人
      
      
        
      
    
  




  
    
      观看人数:290人
    
    
      
    
  

js

Page({
  data: {
    isFull: false,
  },
  statechange(e) {
    console.log('live-player code:', e.detail.code)
  },
  error(e) {
    console.error('live-player error:', e.detail.errMsg)
  },
  fullScreen: function() {
    this.setData({
      isFull: !this.data.isFull
    })
  }
})

wxss

.player{
  width: 100%; 
  height: 60vmin;
}
.img-idv{
  width: 100%;
  height: 100%;
  background:rgba(0, 0, 0, 0.2);
}
.view-number{
  background-color: #BFBFBF;
  height: 48rpx;
  display: inline-block;
  padding: 2rpx 30rpx;
  line-height: 48rpx;
  border-radius: 25rpx;
  margin-left: 20px;
  margin-top: 16rpx;
}
.img-warp{
  float: right;
  margin-top: 53vmin;
}
.full-img{
  width: 5vmin;
  height: 5vmin;
}
.full-player{
  width: 100%;
  height: 100vh;
} 
.full-view-number{
  margin-top: 5vh;
}
.full-img-warp{
  float: right;
  margin-top: 90vh;
}

你可能感兴趣的:(微信小程序live-player全屏设置)