QuickTime loading new movie not scaling
I have the following code, mainly copied from Apple's QT Guide, which I use to display a few movies:
<noscript>
<object id="video_obj" TARGETCACHE="true" width="480" height="320" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="images/loginbig.gif" />
<param name="controller" value="true" />
<param name="autoplay" value="false" />
<param name="postdomevents" value="true" />
<param name="TARGETCACHE", value="true"/ >
<embed src="images/loginbig.gif"
width="480" height="320"
controller="true" autoplay开发者_JAVA技巧="false"
scale="aspect" cache="true"
name="video_obj"
id="video_obj_embed"
postdomevents="true"
TARGETCACHE="true"
pluginspage="http://www.apple.com/quicktime/download/"
/>
</object>
</noscript>
<script language="javascript" type="text/javascript">
QT_WriteOBJECT('images/loginbig.gif' , '480', '320', ''
,'id','video_obj'
,'controller', 'true'
,'postdomevents', 'true'
,'cache', 'true'
,'autoplay', 'false'
,'emb#id','video_obj_embed'
,'emb#scale','aspect'
,'name', 'video_obj'
,'type', 'video/quicktime'
,'scale', 'aspect'
);
</script>
<script type="text/javascript" charset="utf-8">
var video = document.video_obj;
</script>
I change video by doing
video.SetURL('http://dns.com/video.mp4');
But if the new video's size is larger than the preset width and height, it won't automatically fit to the video screen, I tried everything I can think of and read up but to no avail. Please do share your advice on how one may tackle this.
Thanks!
You have aspect defined in the embed tag, but not in the params. I think you may need to add this: <param name="scale" value="aspect" />
To keep the parameters from the plugin initialization for other videos, use 'SAVEEMBEDTAGS','true'
QT_WriteOBJECT('logo.mov' , '720', '576', '',
'EnableJavaScript', 'True',
'emb#NAME' , 'movie1' ,
'obj#id' , 'movie1',
'controller', 'false' ,
'scale', 'tofit',
'SAVEEMBEDTAGS','true' ) ;
精彩评论