Microsoft’s contribution to Chromium plus one: commit new code to avoid accidentally playing sounds

Nowadays, when most browsers visit websites, the page video will be played in a muted state even if it is autoplayed, so as to avoid embarrassment caused by sound in inappropriate places.

However, if a website uses an iframe to nest audio and video, the browser may not be able to mute it properly, and Microsoft engineers have recently submitted a code improvement to the Chromium project to reduce unexpected audio and video playback problems.

Pirates hit gold, 800 explosion rate, and you can become the first swordsman when you hang up!
ad
9377 Legendary
Pirates hit gold, 800 explosion rate, and you can become the first swordsman when you hang up!
According to Microsoft’s proposal, the new permission policy is called “media-playback-while-not-visible”, which means “pause media playback when it is not visible”.

This policy allows web developers to control embedded audio and video content through APIs, automatically pause media playback when the relevant iframe is not visible, and resume playback only when the iframe is redisplayed.

In its proposal, Microsoft points out that while current developers have some solutions to the problem of unexpected playback, these methods often lead to performance and user experience issues.

For example, a developer may stop playback by completely uninstalling and reloading an iframe, but this will increase the page’s load time and resource consumption.

Microsoft’s new strategy provides a more efficient and elegant solution to reduce the occurrence of accidental playback by controlling the playback of invisible media through the browser’s own mechanisms.

The Japanese have been smart and innovative and have broken down language barriers
ad
Enence
The Japanese have been smart and innovative and have broken down language barriers
This improvement will improve the browsing experience for users when using Chromium-based browsers such as Chrome and Edge, and reduce distractions caused by accidental playback.

It’s important to note that this new permission policy isn’t currently enabled by default and is still experimental, and Microsoft expects developers to actively test it and provide feedback to further refine it.

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注