From 9afc56c72145d6a0b6ddf16c0601580c7f2eadf8 Mon Sep 17 00:00:00 2001 From: daniel <6086151+dancci@users.noreply.github.com> Date: Thu, 2 Sep 2021 23:26:59 +0800 Subject: Translation: Autoplay guide for media and Web Audio APIs (#2248) --- files/zh-cn/web/media/autoplay_guide/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/zh-cn') diff --git a/files/zh-cn/web/media/autoplay_guide/index.html b/files/zh-cn/web/media/autoplay_guide/index.html index aa8c207ed2..332f54bfa4 100644 --- a/files/zh-cn/web/media/autoplay_guide/index.html +++ b/files/zh-cn/web/media/autoplay_guide/index.html @@ -4,7 +4,7 @@ slug: Web/Media/Autoplay_guide translation_of: Web/Media/Autoplay_guide original_slug: Web/媒体/Autoplay_guide --- -
Automatically starting the playback of audio (or videos with audio tracks) immediately upon page load can be an unwelcome surprise to users. While autoplay of media serves a useful purpose, it should be used carefully and only when needed. In order to give users control over this, browsers often provide various forms of autoplay blocking. In this guide, we'll cover autoplay functionality in the various media and Web Audio APIs, including a brief overview of how to use autoplay and how to work with browsers to handle autoplay blocking gracefully.
+网页加载完成后立即播放音频(或带有音频轨道的视频)可能会意外地打扰到用户。尽管自动播放媒体文件是一个很实用的功能,但是我们也应该谨慎地使用它,保证只有在它被需要的时候才使用。为了让用户拥有控制权,通常浏览器会提供各种方式禁用自动播放音频功能。在这篇文章中,我们将介绍各种媒体和 Web Audio APIs 的自动播放功能,包括关于如何使用自动播放功能、如何优雅的处理阻止自动播放功能的一些简短的介绍。
Autoplay blocking is not applied to {{HTMLElement("video")}} elements when the source media does not have an audio track, or if the audio track is muted. Media with an active audio track are considered to be audible, and autoplay blocking applies to them. Inaudible media are not affected by autoplay blocking.
-- cgit v1.2.3-54-g00ecf