Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

iOSでvideoタグをinline再生する

More than 3 years have passed since last update.

iOS上でvideoタグをフルスクリーンではなくinlineで再生したい場合がある。

  1. videoタグを再生ではなく、currentTimeを動かす→iPhone Safariで動画をインライン再生する方法
  2. iOS10の場合、videoタグにwebkit-autoplayesinlineとplaysinlineを指定する→ iOS 10 Safari から video の inline 再生が可能になります

2の場合

<video id="backgroundvideo" webkit-playsinline playsinline autoplay loop>
  <source src="./video.webm" type="video/webm">
  <source src="./video.mp4" type="video/mp4">
  <p>動画を再生できる環境ではありません。</p>
</video>

という風に2つ指定してあげて下さい。

fukamiiiiinmin
こんにちは、僕です
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away