It is pretty easy to embed an iPhone-optimized video in any website you are designing. Which can be a nice flourish to welcome the growing hordes of iPhone users who might be visiting your site soon.
All video format is not playing in iPhone or iPad. The most commonly used format is m4v and it is lightweight too. You have to convert your video into m4v format and then have to write a little chunk of html5, yes HTML5 code.
The code snippet is:
<video width="100%" height="300" controls="controls" preload="none">
Donâ€™t forget to start your html with . You also an use a poster using poster attribute and autoload option. Try html5 video in w3schools.com
Now, how you can convert into m4v:
- Play your video in QuickTime Player
- Go to File > Export for web
- Select your choice
- Then you will get your required m4v file
Itâ€™s interesting, isnâ€™t it? This video will also play in iPad.