<video muted controls="true" loop id="v" width="100%" height="100%" src="pattern.m4v">
The video plays when I hit it direct on iOS (localhost/patter.m4v) yet it absolutely will NOT play when I hit my index.html. In fact, I can't even get the video to play by tapping on it directly even when visible.
This took way too long to solve for how simple of a problem it is AND how simple the solution was.
Out of all the articles I read, this article on html5 video in webkit helped the most. If my solution does not work for you, I highly encourage you to consult that link as the solution to your problem is likely in there.
Problems
<canvas>
element was over my <video>
element, even if not visually. If this is your problem, there are tricks like position: absolute
and/or z-index:999
playinline
for my video or it would only play full screen. Note that autoplay
and videoElement.play()
only work with playinline
.Cliff notes:
autoplay
works in iOS10 (a)playsinline
works in iOS10 (a)Code
<video playsinline muted controls loop autoplay id="v" width="400" height="400" src="pattern.m4v">
a: As long as it abides by the rules listed in the link above (second paragraph)