zsk 2 years ago
parent c495701c5c
commit 5281760738

@ -68,6 +68,24 @@ Page({
showfixToast:false,
current:0,
},
showVideo (e) {
console.log(e.target.dataset.id);
console.log(wx.getSystemInfo());
var that = this;
this.videoContext = wx.createVideoContext(`${e.target.dataset.id}`, this);
this.videoContext.requestFullScreen();
this.videoContext.hideStatusBar();
this.videoContext.play();
// setTimeout(() => {
// that.setData({
// isShareShow: true,
// });
// }, 500);
},
fullScreen(){
this.videoContext.stop();
},
doNothing(){},
closeFix(){
this.setData({

@ -62,6 +62,10 @@
<view class="p016 mt12" wx:if="{{images.length > 0}}">
<block wx:for="{{images}}" wx:for-item="item" wx:key="index">
<image src="{{item.url}}" bind:tap="showImage" wx:if="{{item.isImg}}" data-src="{{item.url}}" class="img5" mode=""/>
<view class="videoContainer" data-id="{{item.id}}" hover-class="none" catchtap="showVideo" hover-stop-propagation="false" wx:if="{{!item.isImg && item.url}}" style="display:inline-block">
<video class="img5" id="{{item.id}}" data-id="{{item.id}}" src="{{item.url}}" show-fullscreen-btn="{{false}}" show-play-btn="{{true}}" show-center-play-btn="{{true}}" enable-play-gesture="{{true}}" bindfullscreenchange="fullScreen">
</video>
</view>
</block>
</view>

Loading…
Cancel
Save