Hi Natalia,
Here you go. This works for me on my iPhone. I did notice in your code on the link you sent me, there was a number of extra lines and white space.
If this happens again from copying from your email, view the source on the live example link provided and copy from there.
Live Example:
http://designdrumm.com/clients/natalia
[CODE]
<meta name="author" content="DESIGN DRUMM Š 2014" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=1" />
<title>Jack And The Giant</title>
<script type="text/javascript">
function hasFlash() {
try {
var AXO = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if(AXO) { return true; } else { return false };
} catch(e){
return navigator.mimeTypes ["application/x-shockwave-flash"] != undefined ? true:false;
}
};
function hasQt() {
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf ("QuickTime") >= 0) {
return true;
}
}
}
if ((navigator.appVersion.indexOf("Mac") > 0) &&
(navigator.appName.substring(0,9) == "Microsoft") &&
(parseInt(navigator.appVersion) < 5) ) {
return true;
}
return false;
};
function supports_video() {
return !!document.createElement('video').canPlayType;
}
function supports_h264_baseline_video() {
if (!supports_video()) { return false; }
var v = document.createElement("video");
return v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
}
function supports_ogg_theora_video() {
if (!supports_video()) { return false; }
var v = document.createElement("video");
return v.canPlayType('video/ogg; codecs="theora, vorbis"');
}
function supports_webm_video() {
if (!supports_video()) { return false; }
var v = document.createElement("video");
return v.canPlayType('video/webm; codecs="vp8, vorbis"');
}
function loadVideo() {
var videoCode = '';
if( hasFlash() == false && supports_h264_baseline_video() != "") {
/*HTML5 - h.264*/
videoCode = '<video id="jack_giant" width="100%" height="100%" controls preload="auto" poster="jack_giant.png" style="position:absolute;z-index:0;">\n'+
' <source src="jack_giant.mp4" type="video/mp4">\n'+
' </video>\n';
} else if( hasFlash() == false && supports_ogg_theora_video() != "") {
/*HTML5*/
videoCode = '<video id="jack_giant" width="100%" height="100%" controls preload="auto" poster="jack_giant.png" style="position:absolute;z-index:0;">\n'+
' <source src="jack_giant.ogg" type="video/ogg">\n'+
' </video>\n';
} else if( hasFlash() == false && supports_webm_video() != "") {
/*HTML5*/
videoCode = '<video id="jack_giant" width="100%" height="100%" controls preload="auto" poster="jack_giant.png" style="position:absolute;z-index:0;">\n'+
' <source src="jack_giant.webm" type="video/webm">\n'+
' </video>\n';
} else if( hasFlash() == false && supports_video() == false && hasQt() == true ) {
/*HTML4 QuickTime Embed - works on IE 7 and 8*/
videoCode = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="
http://www.apple.com/qtactivex/qtplugin.cab" height="100%" width="100%" >\n'+
' <param name="src" value="jack_giant.mov" >\n'+
' <embed src="jack_giant.mov"'+
' height="100%"'+
' width="100%"'+
' type="video/quicktime"'+
' pluginspage="
http://www.apple.com/quicktime/download/"'+
' style="position:absolute;z-index:0;"'+
' />\n'+
'</object>\n';
} else if( hasFlash() == true ) {
document.getElementById("videoplayer").innerHTML = videoCode;
}
</script>
</head>
<body>
<div id="videoplayer"></div>
<script type="text/javascript">
loadVideo();
</script>
</body>
</html>
[END CODE]
Oh and here is the reference for the QuickTime code in case you want to embed differently. No cache progressive downloads, real-time feed, etc.
https://developer.apple.com/library/mac/documentation/QuickTime/Conceptual/QTScripting_HTML/QTScripting_HTML_Document/ScriptingHTML.html#//apple_ref/doc/uid/TP40001525-2-ApplicationsandExamples
HTH,
Best,
Karl DeSaulniers
Design Drumm
http://designdrumm.com
>
>
> On Jul 27, 2014, at 12:26 PM, Henrik Andersson <
he...@henke37.cjb.net> wrote:
>
>> This assumes that all mobile devices are incapable of Flash. That's
>> patently false. It also ignores the issue of non-mobile devices that
>> doesn't support Flash.