2

I have tried the solutions outlined here: HTML5 videos not working in Safari Video tag not working in Safari now

without any success.

Here is what I have: <video controls class="video" autoplay loop poster="video/Innocence.jpg" data-setup="{}"> <source src="video/main-vid.webm" type="video/webm"> </video>

Plays in Chrome and FF, but not Safari. So my iPhone does not play it. Does anyone have any suggestions?

codemonkey
  • 7,325
  • 5
  • 22
  • 36

1 Answers1

3

WebM video format does not appear to be currently supported by Safari: http://caniuse.com/#feat=webm

To reach the widest audience, you'll want to use MP4, Ogg, and WebM formats:

<video controls class="video" autoplay loop poster="video/Innocence.jpg" data-setup="{}">
    <source src="video/main-vid.mp4" type="video/mp4" />
    <source src="video/main-vid.ogv" type="video/ogg" />
    <source src="video/main-vid.webm" type="video/webm" />
</video>

Note that the MP4 source should be listed first to work in older versions of iOS.

jrrdnx
  • 1,565
  • 3
  • 15
  • 23
  • 1
    It is supported now, but there are other problems. – Mark Rogers Jul 16 '21 at 15:19
  • I have the same issue, I cant play mp4 video in Safari, so do I need to convert blob after we record the video the format you mentioned `mp4, ogg, webm` because after I record video I am saving in aws s3 as mp4 extension. Due to this Safari is not playing ?? – Sara Jan 23 '23 at 12:28