var videohammer = new Hammer(videobox);
videohammer.get('swipe').set({ direction: Hammer.DIRECTION_ALL });
videohammer.on("swipeup", function(ev) {
videohide();
})
function videohide(){
$("#videobox,#video").hide(0,function(){
$("#video").get(0).pause();
$("#video").get(0).currentTime=0;
mySwiper.slideTo(3);
$("#media").get(0).play();
$("#audio_btn").addClass("rotate").show();
});
}
.videobox{display: none; position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: 2; background: rgba(0,0,0,0.8);/* background: transparent;*/}
#video{ background: transparent;}
<div class="videobox" id="videobox">
<video id="video" src="flash/video.mp4" preload="true" loop="loop" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-video-player-type="h5" x5-videoplayer-fullscreen="true"></video>
<img src="images/arrow2.png" class="arrow" />
<img src="images/arrow2.png" class="arrow arrow1" />
</div>
当我滑动元素videobox,隐藏元素videobox时,只有android视频显示黑屏。退出全屏视频时会有一个过程。首先,视频消失,然后黑屏消失。