如何将Flowplayer设置为透明?

时间:2012-08-21 15:33:55

标签: transparent flowplayer

我正在为我的播放器使用此代码:

    <div class="video">
            <div id="player">
                                        <script type="text/javascript" src="/flowplayer/flowplayer-3.2.10.min.js"></script> 
                                            <a href="http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv" style="display:block;width:640px;height:480px" id="myAlternativeContent"></a> 
                    <script>
                        flowplayer("myAlternativeContent", { 
                             src:"/flowplayer/flowplayer.commercial-3.2.11.swf", 
                             wmode: 'transparent',
                             key: '#$52177209b15c5b2bf56'
                             },
                             {
                          clip:  {
                              autoPlay: false,
                              autoBuffering: true,
                              url: 'http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv',
                              provider: 'lighttpd'
                          },
                          plugins: {
                                lighttpd: {
                                    url: "/flowplayer/flowplayer.pseudostreaming-3.2.9.swf"
                                }
                            }
                        });
                                            </script>
    <!-- this will install flowplayer inside previous A- tag. -->


                                <!-- id="player" --></div>   

然而,玩家似乎并不透明。当我添加播放器广告但他们没有显示时。我的代码有问题吗?

1 个答案:

答案 0 :(得分:1)

您可以使用对象参数来设置播放器的wmode属性,但必须是第二个参数,包括要在播放器swf中传递的src属性(这是你的第二个参数)。

http://flash.flowplayer.org/demos/configuration/wmode.html

flowplayer("player", {
    src:"http://releases.flowplayer.org/swf/flowplayer-3.2.14.swf",
    wmode: "opaque" // This allows the HTML to hide the flash content
},
{
    clip: {
        url: 'http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv'
    }
});