--- title: GlobalEventHandlers.onplaying slug: Web/API/GlobalEventHandlers/onplaying translation_of: Web/API/GlobalEventHandlers/onplaying ---
{{ApiRef("HTML DOM")}}

The onplaying property of the {{domxref("GlobalEventHandlers")}} mixin is the {{event("Event_handlers", "event handler")}} for processing {{event("playing")}} events.

playing 事件将会在媒体做好播放准备后(因暂停或网络延迟而导致媒体数据缺失)触发。

语法

element.onplaying = handlerFunction;
var handlerFunction = element.onplaying;

handlerFunction 为 null 或一个函数 指定事件处理程序

规范

Specification Status Comment
{{SpecName('HTML WHATWG','#handler-onplaying','onplaying')}} {{Spec2('HTML WHATWG')}}

 浏览器兼容性

{{Compat("api.GlobalEventHandlers.onplaying")}}

See also