如何让H5 video标签在移动端,不默认全屏播放。
参考美拍,优酷,微视等移动端H5页面。他们皆可不全屏播放video。
!!!不要跟我说
可以在 video 标签上加一个 “webkit-playsinline” 属性
很明显这是不可以实现的,不管是Ios还是安卓都一样还是照旧全屏播放
求大神,求大牛解答
阿神2017-04-17 12:08:22
To add the reason for this problem:
The operation of VIDEO browsed by each mobile phone is different.
iphone Unless the page itself is an apology page within the APP, with the APP's own operation of H5 webview, the video playback can be realized without full screen
Starts from andriod 6.0 or above. Xiaomi mobile phones, etc., will start to default to the video tag. Will not play in full screen by default.
So click here.
Thank you both for your answers
黄舟2017-04-17 12:08:22
x-webkit-airplay="true"
webkit-playsinline="true"
Write it like this and try it!
PHP中文网2017-04-17 12:08:22
webkit-playsinline="true" must be used in conjunction with the application's internal API. It is meaningless to use it alone. http://stackoverflow.com/questions/3699552/html5-inline-video-on-iphone-vs-ipad-browser