Microsoft’s feature will pause media playback when video is not loaded in Chrome, Edge


Under Satya Nadella, Microsoft has repositioned itself as an open-source champion. The company regularly contributes to Chromium, which powers browsers like Edge, Chrome, Brave, and Vivaldi. Thanks to Microsoft, Chromium has improved significantly with smooth scrolling. Now, the company wants to improve media playback in Chrome and Edge.

Microsoft wants to pause media playback when video is not rendered on a website. As you probably know, web apps or websites may embed media content in various ways, but the most common method is to use iframes, which may temporarily hide the media when the website is loading.

The problem with the current approach is that even if the video doesn’t load or appear on the website, the media will have already started to play. In such a case, you will notice that the browser is playing something, and audio is also coming out, but you can’t see anything on the website.

In a GitHub document posted by Microsoft earlier this year and first spotted by Windows Latest today, Microsoft noted that this experience in Chrome or Edge “could have a negative experience”.

The company wants to address this behaviour by improving embedded media content integration in Chromium-based browsers.

“This proposal aims to provide web applications with the ability to control embedded media content in such a way that guarantees their users have a good experience when the iframe’s render status is changed,” Microsoft noted in a support document, which is approximately three months old.

So, how does Microsoft plan to fix this behaviour in Google Chrome and Edge? According to the proposal, Microsoft wants Chromium to use a new policy that will control how the iframe media playback works.

Microsoft will first try to determine whether the embedded video has been rendered or not.

If the video is not rendered, your browser will not play it. Chromium will be able to instruct the media embedded to pause the iframe media playback. At the same time, when iframe has rendered and video is visible to you, Chromium will order the embedded to resume the iframe media playback.

“Adds a “media-playback-while-not-rendered” permission policy to allow embedder websites to pause media playback of embedded iframes which aren’t rendered – i.e. have their “display” property set to “none”, Microsoft explained the idea behind the proposed “media-playback-while-not-rendered” permission policy.

Chromium video embed feature
Chromium video embed feature | Image Courtesy: WindowsLatest.com

“This should allow developers to build more user-friendly experiences and to also improve the performance by letting the browser handle the playback of content that is not visible to users,” the company added.

According to a fresh Chromium commit, Microsoft has already started integrating the media-playback-while-not-rendered permission policy into Chromium.

“This CL adds a the media-playback-while-not-rendered, which allows the UA (user-agent) to pause media playback on not-rendered iframes,” Microsoft noted in a new code commit.

It goes without saying Microsoft’s idea is pretty smart, and it can significantly improve your browsing experience, especially if you browse websites with tons of videos.

It’s unclear when the feature will be added to Chrome or Edge, but it could arrive in beta in the coming months.



Source link

Previous articleLegendary Trader Peter Brandt Reveals Real Concern for Bitcoin