In iOS 10+
Apple finally enabled the attribute playsinline
in all browsers on iOS 10, so this will work seamlessly:
<video src="file.mp4" playsinline>
In iOS 8 and iOS 9
You can work around this issue by simulating the playback by skimming the video instead of actually .play()
'ing it.
In short, use iphone-inline-video, it takes care of the playback and audio sync (if any), and it keeps the <video>
working as it should.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…