-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zh-cn]: Update translation of autoplay_guide #14663
Conversation
[zh-cn]: Update translation of autoplay_guide
Preview URLs Flaws (2)URL:
(comment last updated: 2023-08-22 04:45:28) |
[zh-cn]: Update translation of autoplay_guide
[zh-cn]: Update translation of autoplay_guide
Update translation of autoplay_guide Co-authored-by: A1lo <[email protected]>
Update translation of autoplay_guide Co-authored-by: A1lo <[email protected]>
[zh-cn]: Update translation of autoplay_guide
[zh-cn]: Update translation of autoplay_guide
|
||
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. | ||
当源媒体没有音轨或音轨静音时,阻止自动播放*不会*应用于 {{HTMLElement("video")}} 元素。具有活动音轨的媒体被认为是**可听的**,并且阻止自动播放适用于它们。**听不见的**媒体不受阻止自动播放的影响。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉这里的“audible”有点过于“直译”,考虑一下是否要翻译成“未静音”和“静音”。
function handleFirstPlay(event) { | ||
let vid = event.target; | ||
|
||
vid.onplay = null; | ||
|
||
// Start whatever you need to do after playback has started | ||
// 播放开始后开始执行您需要执行的操作 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
``` | ||
|
||
After getting a reference to the video element from the {{domxref("Event")}} object's {{domxref("Event.target", "target")}}, the element's `onplay` handler is set to `null`. This will prevent any future `play` events from being delivered to the handler. That could happen if the video is paused and resumed by the user or automatically by the browser when the document is in a background tab. | ||
从 {{domxref("Event")}} 对象的 {{domxref("Event.target", "target")}} 获取对视频元素的引用后,该元素的 `onplay` 处理程序将设置为 `null`。这将阻止任何未来的播放事件被传递给处理程序。当文档位于后台选项卡时,如果用户暂停并恢复视频或浏览器自动暂停和恢复视频,则可能会发生这种情况。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对照英文更新翻译
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @R2h1
***@***.***的自动回复邮件。已收到您的邮件!
|
[zh-cn]: Update translation of autoplay_guide
Description
Motivation
Additional details
Related issues and pull requests