【问题标题】:Windows Media player object z-indexWindows Media 播放器对象 z-index
【发布时间】:2011-10-16 15:58:33
【问题描述】:

是什么让 windows 媒体播放器覆盖了我的下拉菜单页面元素?如果我更改媒体播放器对象的 z-index 似乎没有帮助。我的下拉菜单页面元素的 z-index 为 99,对象的 z-index 为 40。此问题仅在视频运行时发生。当它不运行时,下拉菜单元素显示在对象顶部。这是 HTML。

<div id="player" style="position: relative; top: 20px; left: 35px; width: 64.5%; border: 2px solid grey; z-index: 40;">
    <object id="MediaPlayer" width="100%" height="377" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="left: 0px; top: 0px; background-repeat: no-repeat; background-position: center center; z-index: 40;" type="application/x-oleobject">
    <param name="uiMode" value="full" />
    <param name="AutoStart" value="FALSE" />
    <param name="AllowChangeDisplaySize" value="TRUE" />
    <param name="AutoSize" value="TRUE" />
    <param name="Volume" value="100" />
    <param name="URL" value=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 />
    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer" src=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 width="100%" height="377" showcontrols="1" showtracker="1" autostart="0" volume="100" />              
    </object>                   
</div>

【问题讨论】:

    标签: object embed media-player


    【解决方案1】:

    尝试查看 wmode 参数,http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/

    【讨论】:

    • 感谢您的提示。播放此视频的网站似乎已关闭。如果这能解决问题,我会更新。
    • 对我有用的是&lt;object&gt;标签中的&lt;param name="windowlessVideo" value="true" &gt;&lt;embed&gt;标签中的windowlessVideo="true"
    【解决方案2】:

    对我有用的是&lt;object&gt; 标签中的&lt;param name="windowlessVideo" value="true" &gt;&lt;embed&gt; 标签中的windowlessVideo="true"。我不必指定 wmode 参数。这是有效的 HTML。

        <object id="MediaPlayer" width="100%" height="377" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="left: 0px; top: 0px; 
    
    background-repeat: no-repeat; background-position: center center;" type="application/x-oleobject">
          <param name="uiMode" value="full" />
          <param name="AutoStart" value="FALSE" />
          <param name="AllowChangeDisplaySize" value="TRUE" />
          <param name="AutoSize" value="TRUE" />
          <param name="Volume" value="100" />
          <param name="URL" value=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 />
              <!-- Be careful with opaque.  The adobe documentation isn't clear about what it does for layering -->
              <!-- Documentation about OBJECT and EMBED at http://kb2.adobe.com/cps/127/tn_12701.html -->
              <!-- param name="wmode" value="opaque" / -->
              <param name="windowlessVideo" value="true" />
              <embed windowlessVideo="true" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" 
    
    name="MediaPlayer" src=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 width="100%" height="377" showcontrols="1" 
    
    showtracker="1" autostart="0" volume="100" />              
         </object>
    

    【讨论】:

    • 不错!这让我在下拉菜单后面嵌入了 Windows Media Player。谢谢!
    【解决方案3】:

    这些都不适用于 Google Chrome。当涉及 Windows 媒体播放器时,ASP 菜单总是进入后台。

    【讨论】:

      猜你喜欢
      • 2010-09-24
      • 1970-01-01
      • 2013-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-19
      • 1970-01-01
      相关资源
      最近更新 更多