pAkY88
pAkY88

Reputation: 6294

Which video format should I use for my <video> tag on iPhone and iPad?

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

Upvotes: 2

Views: 816

Answers (2)

Paul D. Waite
Paul D. Waite

Reputation: 98786

Dive into HTML5 covers it pretty exhaustively:

You may need to re-encode the video.

Upvotes: 1

JSacksteder
JSacksteder

Reputation: 790

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.

Upvotes: 1

Related Questions