Flash 电影播放器坏了!除了 wmode 值“window”之外,allowFullScreen 不起作用。 (默认)
我的页面上有一个播放视频的 Flash 播放器。我还有模态弹出窗口(由 div 元素组成),需要能够在打开时显示在 Flash 播放器的顶部,等等...我无法更改这些要求中的任何一个,因为它们是我已得到规格。
Flash 似乎忽略了我用 css 设置的 z 索引,因此,如果我将视频播放器的 wmode 设置为不透明或透明,模式弹出窗口只会出现在视频播放器上方。 但是,如果我这样做,那么全屏功能将停止正常工作:当我取消全屏显示视频时,它会保持放大状态。
简而言之
如果您打开在项目页面上弹出 或包含 flash 的另一个页面 弹出窗口应显示在此处。
Flash 忽略 z-index 值。
您可以停止 Flash 忽略 z-index 通过将 wmode 设置为不透明来设置值 或透明而不是 默认值:窗口。
这会阻止全屏工作 正确。
之前有其他人遇到过这个问题吗?我可以做什么来修复它?我正在考虑每当打开模态弹出窗口时使用 wmode=opaque 重新创建视频播放器,然后在模态弹出窗口关闭时将其切换回 wmode=window,因为这意味着弹出窗口应显示在其上方(如 wmode=opaque )并且全屏应该正常工作(如 wmode=window)。然而,这根本不理想:除了作为黑客攻击之外,它还意味着如果有人单击打开弹出窗口的按钮,视频将停止播放。
干杯!
I have a flash player on a page which plays videos. I also have modal popups (made out of div elements) which need to be able to display over the top of the flash player when they are opened, etc... I can't change either of these requirements since they are part of the spec I have been given.
Flash seems to ignore z-indexes I set on it with css, and the modal popups will therefore only appear above the video player if I set the video player's wmode to opaque or transparent. However, if I do this then the full screen functionality stops working correctly: when I un-fullscreen the video it stays zoomed in.
In short
If you open a popup on an item page
or another page containing flash the
popup should be displayed above this.Flash ignores z-index values.
You can stop flash ignoring z-index
values by setting wmode to opaque
or transparent rather than the
default: window.This stops full screen from working
correctly.
Has anybody else faced this issue before? What can I do to fix it? I was thinking of recreating the video player with wmode=opaque whenever I opened a modal popup and then switching it back to wmode=window when the modal popup is closed, since this would mean that the popup should display above it (as wmode=opaque) and the fullscreen should work correct (as wmode=window). However, this is not ideal at all: as well as being a hack it would also mean that the video would stop playing if somebody clicked a button which opened a popup.
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的办法可能是监听
flash.events.FullScreenEvent.FULL_SCREEN
,并在发生这种情况时强制重置 Video 对象的宽度和高度。这意味着您可以继续使用不透明的 wmode。
Your best shot would probably be to listen for
flash.events.FullScreenEvent.FULL_SCREEN
and when that occurs force a reset of the width and height of the Video object.This means that you can continue to use opaque wmode.