search

Home  >  Q&A  >  body text

html5 - 如何让H5 video标签在移动端,不默认全屏播放。

如何让H5 video标签在移动端,不默认全屏播放。

参考美拍,优酷,微视等移动端H5页面。他们皆可不全屏播放video。

!!!不要跟我说

可以在 video 标签上加一个 “webkit-playsinline” 属性

很明显这是不可以实现的,不管是Ios还是安卓都一样还是照旧全屏播放

求大神,求大牛解答

巴扎黑巴扎黑2781 days ago883

reply all(3)I'll reply

  • 阿神

    阿神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

    reply
    0
  • 黄舟

    黄舟2017-04-17 12:08:22

    x-webkit-airplay="true"
    webkit-playsinline="true"
    Write it like this and try it!

    reply
    0
  • PHP中文网

    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

    reply
    0
  • Cancelreply