blob: d4d5e11da989805163e6c8618c81bcf65f1e8dbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// $Id$
/**
* @file
* This file contains some useful functions which fixes different
* Internet Explorer strange behaviours.
* This file is inclueded at each video play.
* See functions video_play and theme_video_get_script on video.module
* file for more informations.
*
* @author Fabio Varesano <fvaresano at yahoo dot it>
*/
//We do this code only on Internet Explorer.
if (document.all) {
// Fix for the "Click to interact with ActiveX control" message on IE
var objects = document.getElementsByTagName( 'object' );
for ( var i = 0; i < objects.length; i++ ) {
var obj = objects[ i ];
var clone = obj.cloneNode( true );
var parent = obj .parentNode;
var sibling = obj .nextSibling;
parent.removeChild( obj );
parent.insertBefore( clone, sibling );
clone.outerHTML = clone.outerHTML;
}
function InsertQuicktimeVideo(vidfile, height, width)
{
document.writeln('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + width + '" height="' + height + '" scale="tofit" codebase="http://www.apple.com/qtactivex/qtplugin.cab">');
document.writeln('<param name="SRC" value="' + vidfile + '" />');
document.writeln('<param name="AUTOPLAY" value="true" />');
document.writeln('<param name="KIOSKMODE" value="false" />');
document.writeln('<embed src="' + vidfile + '" width="' + width + '" height="' + height + '" scale="tofit" autoplay="true" kioskmode="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>\n</object>');
}
}
|