JW Player嵌入式Flash播放器无法正常播放

时间:2009-08-21 15:34:41

标签: javascript flash jwplayer

问题:当我按播放时,音频开始但视频没有。

代码:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>JW Player for Flash</title>

</head><body>

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
    swfobject.registerObject("player","9.0.98","expressInstall.swf");
</script>

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="468" height="262">
    <param name="movie" value="player-licensed.swf" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="flashvars" value="file=Bioshphere-Museum-of-Water.flv&image=preview.jpg" />
    <object type="application/x-shockwave-flash" data="player-licensed.swf" width="468" height="262">
        <param name="movie" value="player-licensed.swf" />
        <param name="allowfullscreen" value="true" />
        <param name="allowscriptaccess" value="always" />
        <param name="flashvars" value="file=video.flv&image=preview.jpg" />
        <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to watch this video.</p>
    </object>
</object>
</body>
</html>

现场例子:http://solomongiles.com/mediamar/readme.html

解决方案?

3 个答案:

答案 0 :(得分:1)

使用此处的脚本http://www.walkernews.net/2008/01/11/how-to-embed-flv-flash-in-wordpress-or-html/和新播放器。它适用于IE。我还在size参数之后添加了allowfullscreen =“true”allowsscriptaccess =“always”。在IE中播放但没有全屏播放。如果可以的话请帮忙。

答案 1 :(得分:0)

在mac / safari 4.0.3中正常工作。

但是我注意到一件事 - 你的flashvars对象和param位不匹配。它们应该是一样的。

此外,您还希望研究一种更灵活的嵌入式解决方案,例如SWFObject(它可以帮助您进行播放器检测,并让您的文档也可以验证为XHTML)

答案 2 :(得分:0)

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="640" height="480"><param name="flashvars" value="file=http://www.webiste.com/admin/php_uploads/video.flv&image=imgs/image_large.jpg" /><param name="movie" value="flvplayer/player.swf" /><embed src="flvplayer/player.swf" width="640" height="480" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.webiste.com/admin/php_uploads/video.flv&image=imgs/image_large.jpg" /></object>