HTML onwaiting Attribute
Definition and Usage
The onwaiting attribute defines a script to run when the video stops because it needs to buffer the next frame.
This event can also be used on <audio> elements, but it is mostly used for videos.
Applies to
The onwaiting attribute is part of the Event Attributes, and can be used on the following elements:
Elements | Event |
---|---|
<audio> | waiting |
<video> | waiting |
Examples
Audio Example
Run "myFunction" when the audio needs to buffer:
<audio onwaiting="myFunction()">
Video Example
Run "myFunction" when the video needs to buffer:
<video onwaiting="myFunction()">
Browser Support
The onwaiting
attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
audio | Yes | 9.0 | Yes | Yes | Yes |
video | Yes | 9.0 | Yes | Yes | Yes |