在浏览器控制 .Net 中禁用 Flash 音频

发布于 2024-12-29 14:46:21 字数 150 浏览 6 评论 0原文

当我使用具有 WebBrowser 控件(gecko(firefox) 和 WebBrowser 控件 IE)的 My Winform 应用程序时,有没有办法禁用 Flash Audio?

我只会阻止网页(我导航的位置)内的 Flash 音频,而不是应用程序的所有声音。

Is there a way to disable Flash Audio while i'm using My Winform application which has a WebBrowser Control (gecko(firefox) and WebBrowser control IE) ?

I would block only flash audio inside the webpage(where i navigate) not all the sound of my application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吃→可爱长大的 2025-01-05 14:46:21

由于视频的播放都是在 Flash 内部处理的,因此我不知道如何在 swf/Flash 环境之外控制它,特别是如果您仍然需要在其他地方播放音频。

如果您有权访问 swf 的源 .fla,您可以尝试触发 Flash 视频播放器上的静音按钮。加载视频后,立即在 swf 的 ActionScirpt 中执行以下操作:

var muteButton:MovieClip = MovieClip(myFLVPlaybackVideoPlayer.muteButton);
muteButton.on_mc.dispatchEvent(new MouseEvent(MouseEvent.CLICK));

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html

您也可以选择告诉 Flash 停止播放所有内容加载后的声音:

flash.media.SoundMixer.stopAll();

即使您无权访问源,您也可以考虑简单地重新编码视频而不使用任何音频。手刹是免费的,如果你走那条路,应该可以做到这一点。

Since the playing of the video is all handled from within Flash, I am not aware of controlling this outside of the swf/Flash environment especially if you still want audio elsewhere.

If you have access to your swf's source .fla, you can try triggering the mute button on the flash video player. In you swf's ActionScirpt right after you load the video do something like:

var muteButton:MovieClip = MovieClip(myFLVPlaybackVideoPlayer.muteButton);
muteButton.on_mc.dispatchEvent(new MouseEvent(MouseEvent.CLICK));

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html

Optionally you can tell flash to stop playing all sounds after loading via:

flash.media.SoundMixer.stopAll();

Even if you don't have access to the source, you can also consider simply re-encoding the video without any audio. Handbrake is free and should be able to do that if you go that route.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文