Forum Moderators: phranque
Here's how I'm doing it. Note that on the site, the Javascript function is actually an external file.
<html><head>
<title>QuickTime Movie</title>
<script type="text/javascript">
function embed(file,width,height) {
document.write('<!--[if IE]><style type="text/css">object {position: relative; bottom: 3px;}</style><![endif]-->');
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+height+'" width="'+width+'" class="QTembed">');
document.write('<param name="src" value="http://www.example.com/media/'+file+'.mov">');
document.write('<param name="autoplay" value="true">');
document.write('<param name="type" value="video/quicktime" height="'+height+'" width="'+width+'">');
document.write('<embed src="http://www.example.com/media/'+file+'.mov" height="'+height+'" width="'+width+'" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="000000"></embed>');
document.write('</object>');
}
</script></head>
<body>
<script type="text/javascript">
embed('moviefile','300','190');
</script></body>
</html>
Any ideas on how I can fix this?
Thanks,
Matthew
[edited by: MatthewHSE at 3:41 pm (utc) on Dec. 5, 2008]
this link describes the details but i think the external js is the key:
[developer.apple.com...]
External Javascript:
function embed(file,width,height) {
document.write('<!--[if IE]><style type="text/css">object {position: relative; bottom: 3px;}</style><![endif]-->');
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+height+'" width="'+width+'" class="QTembed">');
document.write('<param name="src" value="http://www.example.com/media/'+file+'.mov">');
document.write('<param name="autoplay" value="true">');
document.write('<param name="type" value="video/quicktime" height="'+height+'" width="'+width+'">');
document.write('<embed src="http://www.example.com/media/'+file+'.mov" height="'+height+'" width="'+width+'" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="000000"></embed>');
document.write('</object>');
}
HTML page:
<html>
<head>
<title>QuickTime Movie</title>
<script type="text/javascript" src="/path/to/embed.js"></script>
</head>
<body>
<script type="text/javascript">
embed('moviefile','300','190');
</script>
</body>
</html>
By everything I've read about this, the setup I have *should* work. But it doesn't...
Further ideas very much welcome!
Sorry for the wild goose chase. I should have figured an IE standalone could cause problems like this.
QuickTime has caused me, as a user, much grief on numerous browsers. That has always been the case, and continues to this day from to time; either won't load, or will freeze. IE, FF, doesn't seem to matter. Am no fan of QuickTime at all.Ditto. I suggested some other options (and my reasons), but the site-owner felt that QuickTime provided the highest quality video. So what's a webmaster to do? ;)