Help us understand the problem. What is going on with this article?

Ionicで動画のインライン再生するならconfig.xmlにも追記が必要

More than 1 year has passed since last update.

iOS10から動画のインライン再生ができるようになりました。

ただし、Ionicの場合は config.xmlに以下の記述が必要です。忘れやすいので気をつけましょう。

config.xml
<preference name="AllowInlineMediaPlayback" value="true" />

https://cordova.apache.org/docs/ja/3.1.0/guide/platforms/ios/config.html

videoタグにはplayinlineを書きましょう

 <video 
       muted
       src="<動画のURL>" 
       poster="<サムネのURL>" 
       webkit-playsinline
       playsinline
       autoplay>
</video>

無音(muted)だと自動再生もされるようになります。
噂によると動画の音声トラックがないのも条件らしい(未確認)

ちなみに省電力モードだと自動再生されないので、背景動画等コントローラーなしで使う時はお気をつけて(動画を再生する手段がなくなります)

scrpgil
株式会社キネカでテックリードをしてる完全食推進派で丹羽仁美PのAAでぃべろっぱーです。IonicとGo、AA担当のビール好きです。 Ionic / Stencil / Vim / NEM / Go / Beego / Huel / Beer AAHub運営&開発
https://aahub.org
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした