Embed HTML5 Video for iPad

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
37,903
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 4, 2010

So if you use video sites like youtube and vimeo, here is how you can adapt your code on your website so that your videos will still play on iPad and iPhone

iPad useragent string
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (optikalefxx)

  • If you're doing this on a large site with lots of different javascripts embedded in it, please for your own sake have a programmer look at it and fix the issues with global variables, user agent detection instead of feature detection, and with document.write which is a performance killer.

  • @SeanBlader I agree with most of this, but the general rule of thumb is to use feature detection instead of user agent sniffing. Not the other way around. You don't want to hinder html5 devices if they can use html5 video just because you only allow iphone and ipad.

  • i had a client who couldn't watch my embedded video on his ipad and i know nothing about code but i fixed it within 30 seconds after watching this. you're like a magical smartdude fairy. thank you!

  • @blimpified should i take offense to that? lol. thanks!

see all

All Comments (68)

Sign In or Sign Up now to post a comment!
  • Hey can you help me make it so my members can view the videos i post on their ipods and ipads the site is clonewars . tk (wiouth the space)

  • Unfortunately, This went a little fast for me. I didn't quite understand what this was for. Are we trying to make the videos from YouTube and Vimeo appear on JUST the iPad & iPhone or are we trying to use this for all smartphones (I.E. - iPhone, iPad, Android, Windows, etc, etc.)?

  • thank you! i had a client who couldn't watch my embedded video on his ipad and i know nothing about code but i fixed it within 30 seconds after watching this. you're like a magical smartdude fairy. thank you!

  • Really awesome video! Thanks much!

    P.S. You might want to post that top code in your description too.

  • the user agent string looks very version specific... won't it stop working with a newer version of ipad, or an update, etc?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more