Skip to content

Instantly share code, notes, and snippets.

@tobie
Created August 12, 2010 23:21
Show Gist options
  • Select an option

  • Save tobie/521955 to your computer and use it in GitHub Desktop.

Select an option

Save tobie/521955 to your computer and use it in GitHub Desktop.
(function() {
var ua = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3';
if (navigator.userAgent.indexOf(ua) === 0) {
document.write('<sc' + 'ript src="/js/ios3_bug.js"></sc' + 'ript>');
}
})();
// iPhone OS 3 requires an external script tag to be synchronously
// loaded in the HEAD od the HTML document if there's a reference
// to an external CSS file before the VIDEO tag.
//
// Thinks I'm crazy?
//
// Try it out.
//
// And I'm not done:
//
// Current iPad won't play the video if a SCRIPT tag is included in the HEAD.
// Hence the sniffing (and crying).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment