关于video的用法,详细原文,你们能够点这里
https://developer.mozilla.org...vue
<video class="video" controls> <source src="../company.mp4" type="video/mp4"> </video>
可是我点了视频播放,而后再提交表单,在Android懵逼了ios
视频把表单挡住了,ios是没有这个问题的,这怎么搞呀web
个人解决办法是dom
<video playsinline="true" x-webkit-airplay="true" x5-playsinline="true" webkit-playsinline="true" x5-video-player-type="h5" controls > <source src="../company.mp4" type="video/mp4"> </video>
这样在Android端视频是会全屏播放的,你要提交表单就要暂停视频,那样就会退出全屏,而后操做表单,
视频在暂停的状况下是不会挡住表单的ide
播放视频
退出视频
点击表单,发现不会被挡住了
ios
Android
查了一下网上的解决办法都是用dom解决,有兴趣的朋友能够看一下
https://blog.csdn.net/qq_4095...
我以为比较麻烦,就去看了一下开发者文档,就发现了一个彩蛋,比上面的方法要简单得多,一行代码解决问题
video有poster这个属性post
poster
A URL for an image to be shown while the video is downloading.
If this attribute isn't specified, nothing is displayed until the
first frame is available, then the first frame is shown as the poster
frame.
它的例子也有解析this
Until the video starts playing, the image provided in the posterattribute is displayed in its place. If the browser doesn't support
video playback, the fallback text is displayed.
因此我最后的代码是以下:spa<video class="video" poster="../assets/video.png" playsinline="true" x-webkit-airplay="true" x5-playsinline="true" webkit-playsinline="true" x5-video-player-type="h5" controls > <source src="../company.mp4" type="video/mp4"> </video>
ios端完美
Android端完美
到这里就记录一下此次的问题.net