2
votes

I am trying to embed a mp4 video to make it available also for mobile devices such as iPhone, Android Smartphone and so on.

Of course, I'm using HTML5 video tag but for now it doesn't work like I expected.

Precisely, on the standard web browsers like Chrome and Safari the video can be played normally but on iPhone, iPad and Android not.

The video I want to embed is available in two different formats: - http://www.legrandclub.net/legrandclub_iphone.mp4 - http://www.legrandclub.net/legrandclub_iphone_h264.mp4

This is the HTML5 code I'm using for the embedding:

<video autoplay="autoplay">
  <source src="http://www.legrandclub.net/legrandclub_iphone.mp4" type="video/mp4" />
  <source src="http://www.legrandclub.net/legrandclub_iphone_h264.mp4" type="video/mp4" />
</video>

So my question is: which format should I use to play the video also on iPhone and iPad?

Thanks

2

2 Answers

1
votes

HTML5 is a murky, ever-evolving thing; video is even more so.

http://en.wikipedia.org/wiki/HTML5_video

I would expect the h264 video to play on the iPad, at least.

1
votes

Dive into HTML5 covers it pretty exhaustively:

You may need to re-encode the video.