效果要求 :按住按钮视频全屏播放,松开暂停;
iOS;
<video id="video" style=" object-fit: fill" preload="auto" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-orientation="h5" x5-video-player-fullscreen="true" preload="auto" width=100%; height=100%; src="图片地址"> </video>
效果预览

android
<video id="video2" style=" object-fit: fill" preload="auto" autoplay="autoplay" playsinline="true" webkit-playsinline="true" x-webkit-airplay="allow" airplay="allow" x5-video-player-type="h5" x5-video-player-fullscreen="true" x5-video-orientation="portrait" width=100%; height=100%; src="图片地址"> </video>
Android上不能像苹果一样在浏览器里内嵌播放视频,会加载一个视频播放器全屏播放;
效果预览

相关属性介绍点击这里
object-fit介绍点击这里
网友评论