[更新]更新视频组件配置,调整直播弹出样式

This commit is contained in:
唐明明
2020-12-30 15:13:40 +08:00
parent aa90f73d69
commit e2b2490e1a
6 changed files with 94 additions and 38 deletions

View File

@@ -31,8 +31,9 @@ Component({
* 组件的初始数据
*/
data: {
controls: false,
showPlay: false,
controls: true,
showPlay: true,
showFull: false,
isPlay : false,
playId : 0
},
@@ -60,7 +61,6 @@ Component({
videoContextPrev.play()
this.setData({
isPlay: true,
playId: prevId
})
},

View File

@@ -8,6 +8,8 @@
controls="{{controls}}"
object-fit="{{fit}}"
show-center-play-btn="{{showPlay}}"
show-fullscreen-btn="{{showFull}}"
enable-progress-gesture="{{false}}"
data-videoid="{{item.video_id}}"
bindtap="videoPlay"
bindplay="vipdeBindPlay"
@@ -17,5 +19,7 @@
>
</video>
<image class="videoCover" src="{{item.cover}}" mode="aspectFill"></image>
<!-- 视频播放按钮 -->
<!-- <cover-image class="videoLayer-play {{!isPlay ? 'show': ''}}" src="/static/icons/play_icon.png"></cover-image> -->
</swiper-item>
</swiper>

View File

@@ -23,13 +23,14 @@
/* 视频按钮 */
.videoLayer-play{
position: relative;
position: absolute;
width: 78rpx;
height: 78rpx;
left: calc(50% - 39rpx);
top: calc(50% - 39rpx);
opacity: 0;
transition: all .5s;
z-index: 99;
}
.videoLayer-play.show{