Javascript 将嵌入式 Flash 嵌入到自动播放中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14426747/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
get embeded flash to autoPlay
提问by user1559811
I'm really puzzled how this is not working, but the video just wont auto start for some reason, am I doing something wrong? the embedded code is for flash playback
我真的很困惑这怎么行不通,但由于某种原因视频无法自动启动,我做错了什么吗?嵌入的代码用于 Flash 播放
<object width="600" height="409">
<param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf"></param>
<param name="flashvars" value="src=http%3A%2F%2Fwww.domain.com%2Fvideo%2Ftest%2F<?php echo $video;?>"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<param name="autoPlay" value="true"></param>
<embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf"
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" autoPlay="true"
width="600" height="409" flashvars="src=http%3A%2F%2Fwww.domain.com%2Fvideo%2Ftest%2F<?php echo $video;?>">
</embed>
</object>
回答by hit1205
Try to put autoPlay=truein the flashvarsparam to send this param to swf file:
尝试autoPlay=true输入flashvars参数以将此参数发送到 swf 文件:
<param name="flashvars" value="src=http%3A%2F%2Fwww.domain.com%2Fvideo%2Ftest%2F<?php echo $video;?>&autoPlay=true"></param>
I have tested, it's work.
我已经测试过了,它的工作。
Remember to change the flashvarsattribute in <embed>tag, too =)
记得也要更改标签中的flashvars属性<embed>=)
回答by user3600844
;?>&auto=TR" (not autoPlay only AUTO!)>
;?>&auto=TR"(不是自动播放,只有自动!)>

