我有以下代码,主要是从Apple的QT指南中复制而来,我用它来显示几部电影:
<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="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>
我通过
更改视频video.SetURL('http://dns.com/video.mp4');
但是如果新视频的大小大于预设的宽度和高度,它将不会自动适应视频屏幕,我尝试了所有我能想到的内容并阅读但无济于事。请分享您对如何解决此问题的建议。
谢谢!
答案 0 :(得分:1)
您在embed标记中定义了方面,但在params中没有。我想你可能需要添加:<param name="scale" value="aspect" />
答案 1 :(得分:1)
要保留其他视频的插件初始化参数,请使用&#39; SAVEEMBEDTAGS&#39;,&#39; true&#39;
QT_WriteOBJECT('logo.mov' , '720', '576', '',
'EnableJavaScript', 'True',
'emb#NAME' , 'movie1' ,
'obj#id' , 'movie1',
'controller', 'false' ,
'scale', 'tofit',
'SAVEEMBEDTAGS','true' ) ;