Chrome update blocking autoplay video breaks web games



There are very few Internet users in the world who like the automatic start function of various kinds of videos on some sites. We are talking about a situation where a user opens a certain site, and suddenly, from nowhere, music begins to play (and sometimes very loudly), and in the foreground video with various content is played.

If 1-2 tabs are open, this is a problem, but it can be solved quickly. But if several dozens of tabs are open (and some users do just that), then searching for a site with an auto-playing video turns into torture. In an effort to make staying on the Internet for their users as comfortable as possible, the developers of the Chrome browser added the function of blocking such objects. But the trouble is - along with the video, the new feature also blocks some web games.

The update mentioned above was released for the weekend . He was pleased with millions of Internet users, who are extremely annoyed by the automatic playback of video or audio. But now there is a problem with the games - they themselves work normally, but the audio is not reproduced. It was not immediately clear what could be the matter, but then the developers discovered the root of the problem.

The thing is how Chrome handles WebAudio objects . Now the browser simply stops active objects of this kind. This is done to combat video and advertising, but browser games (many of them) contain WebAudio elements. And they also stop. In order to correct the situation, developers need to add the ability to restart the audio object at the moment when the user starts the game. Previously, this was not necessary, since there were no problems with constantly active objects.

"Developers should familiarize themselves with the new policy, which determines the rules for processing the autoplay function, without the permission of the user, this can no longer be done," said Google. “In a browser game, a new feature can stop Web Audio. We told the developers how to solve the problem. ”

The bad thing is that now the developers of thousands of browser games will have to modify their projects in order to comply with the new rules. At the same time, the company spoke about a rather large-scale and important innovation only in its documentation, and not in traditional communication channels. And this is the reason that now many game developers are unhappy - because they will have to follow the technical documentation published by the corporation. And there are quite a lot of documents, so this requires considerable time.

Information about Web Audio was published in February, but not everyone reads it (most non-Google developers didn’t get to know it). As a result, as mentioned above, thousands of different games now do not work or do not work well in the Chrome browser. True, the corporation has taken care to include about 1000 sites in the white list, which does not affect the new policy - the audio has been played and will be played (for example, YouTube).

Changing your project so that it corresponds to the new policy is not so difficult, but it means that the developer must have access to the source code of the game and the servers hosting the project. And this is impossible for games whose creators have stopped supporting them. Developers may not care, but many users have a decent number of users, and now they can’t do anything - except perhaps replacing the browser, which is not always convenient.

The problem is that all this concerns not the company's proprietary technologies, but the HTML5 standard, which is open to all developers. Thus, a large number of workers in the IT industry are faced with a warning after the fact, although the very concept of openness should help to avoid such situations.

The situation that the old software stops working in new browsers or operating systems is not uncommon. This has already happened with games and applications based on the Adobe Flash platform, with 32-bit iOS applications that do not work, since the system is 64-bit. There are many such examples, and similar situations will occur. But those responsible for developing open standards should be more careful.

Source: https://habr.com/ru/post/412027/


All Articles