wmode property not working for flowplayer

2015-04-21 14:14:44

I have a flowplayer that I am using with a few div tags below it. When you click on div tag it will display another div tag same like dialog box over the page. The problem is the flowplayer will always be on top of the div.

I have tried setting the z-index of the div, but it doesn't work.

Is there a method in flowplayer that will lower its z-index or allow for my div to be placed over it?

I also use wmode property for flowplayer but still it doesn't work.

Following is my code:

<script type="text/javascript" src="/common/js/flowplayer-3.2.9.min.js"></script>
<a href="http://murongshuai.blog.163.com/blog/<?php echo $this->hotelVideoUrl; ?>"
   style="display:block;width:304px;height:208px; z-index: -1; position: relative;"
   id="player">
</a>

<script language="JavaScript">
    flowplayer("player", "/common/js/flowplayer-3.2.10.swf",{         
        clip:  {
            autoPlay: true,            
            autoBuffering: true            
        },
        wmode: 'opaque/transperent'
    });
</script>   
asked May 31 '12 at 11:50
Mark
28511031

3 Answers

According to the document, you should put wmode in the second parameter, an example like:

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

So I guess in your case, if you can try below code:

<script type="text/javascript" src="/common/js/flowplayer-3.2.9.min.js"></script>
<a href="http://murongshuai.blog.163.com/blog/<?php echo $this->hotelVideoUrl; ?>"
   style="display:block;width:304px;height:208px; z-index: -1; position: relative;"
   id="player">
</a>

<script language="JavaScript">
    flowplayer("player", {
        src : "/common/js/flowplayer-3.2.10.swf",
        wmode: 'opaque'}, {         
        clip:  {
            autoPlay: true,            
            autoBuffering: true            
        }
    });
</script>   

You should be able to get it working. Let me know if it works.

点赞

发表回复

电子邮件地址不会被公开。必填项已用 * 标注