如何防止视频在Firefox中自动播放

It seems like every news site starts playing video automatically these days. These are incredibly annoying, but thankfully, it’s easy to block in Firefox.

这些新闻似乎每个新闻站点都开始自动播放视频。 这些令人讨厌,但令人欣慰的是,在Firefox中很容易被阻止。

By default, Firefox allows autoplay content. However, it won’t start playing until the video frame is visible on your screen. This helps prevent sites from hiding video behind other content or at the bottom of the page. Since you’re reading this article, though, we assume you don’t want autoplay at all.

默认情况下,Firefox允许自动播放内容。 但是,它只有在屏幕上显示视频帧后才能开始播放。 这有助于防止网站将视频隐藏在其他内容后面或页面底部。 不过,由于您正在阅读本文,因此我们假设您根本不需要自动播放。

You won’t find a toggle for autoplay in the regular Firefox options menu—it’s hidden in Firefox’s secret about:config advanced menu. Right now we’re only interested in the media autoplay settings, so open a new tab and paste about:config?filter=autoplay into your browser.

在常规的Firefox选项菜单中找不到自动播放的切换按钮,它已隐藏在Firefox的秘密about:config高级菜单中。 现在,我们只对媒体自动播放设置感兴趣,因此请打开一个新标签,然后将about:config?filter=autoplay粘贴到浏览器中。

Don’t worry, messing with the options in about:config won’t actually void any warranties, and as long as you follow these instructions, you won’t likely mess anything up, either. (And if you ever do mess something up, you can fix it by simply “refreshing” Firefox). Go ahead and uncheck “Show this warning next time”, then click “I accept the risk!”

不用担心,弄乱about:config中的选项实际上不会使任何保证失效,而且只要您遵循这些说明,您也就不会搞乱任何东西。 (而且,如果您搞砸了,可以通过“刷新” Firefox来修复它)。 继续并取消选中“下次显示此警告”,然后单击“我接受风险!”

This will bring you to the about:config page, pre-filtered to only show options with “autoplay” in their name. Double-click on “media.autoplay.enabled” to switch it from true to false.

这将带您进入about:config页面,该页面经过预过滤后仅显示名称中带有“自动播放”的选项。 双击“ media.autoplay.enabled”将其从true切换为false。

You’ll notice that the text is now bold. Any setting that has been changed in about:config will have bold text, and the “Status” field will read “modified”. You’ll also notice there’s one more option, “media.block-autoplay-until-in-foreground”. You’ll want to leave this set to true.

您会注意到该文本现在为粗体。 在about:config中更改的任何设置都将以粗体显示,并且“状态”字段将显示为“已修改”。 您还会注意到还有另一个选项“ media.block-autoplay-until-in-foreground”。 您需要将此设置保留为true。

Most about:config changes (including these two) take effect immediately, so there’s no need for a restart. If for any reason you want to turn autoplay back on, you can double-click on “media.autoplay.enabled” again to switch it back.

大多数about:config更改(包括这两个更改)立即生效,因此无需重新启动。 如果出于任何原因要重新打开自动播放,则可以再次双击“ media.autoplay.enabled”将其重新打开。

翻译自: https://www.howtogeek.com/341690/how-to-prevent-videos-from-autoplaying-in-firefox/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值