Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.92 KB

BP_4003_en.md

File metadata and controls

49 lines (32 loc) · 1.92 KB

Avoid autoplay for videos and audio content

Identifiers

GreenIT V2 V3 V4

Categories

Life cycle Tiers Responsible
5. Use User/Device Software Architect/Developer

Indications

Priority Implementation difficulty Ecological impact
4 3 4
Saved resources
Processor / Network / Queries

Description

Automatic videos and audio files activation (autoplay) during web pages loading uses resources on each tier (device, network, data center). In many cases, automatic playback is not necessary. Moreover, it can draw users' attention and distract them from the initially requested service. Therefore, whenever possible, these playbacks should be initiated by the users and by not using the autoplay attributes in the

Nevertheless, some parts of the video or audio files may be downloaded even if autoplay is not activated. Moreover, data will be unnecessarily downloaded even if users do not start the video playback. It is therefore necessary to force browsers not to preload anything by setting the

Example

Video:

<video src="audiofile.webm" preload="none"></video>

Audio:

<audio controls src="audiofile.mp3" preload="none"></audio>

Validation rule

The number of ... is equal to or less than
0