onwaiting Event

Definition and Usage

The onwaiting event occurs when the video stops because it needs to buffer the next frame.

This event can also be used for <audio> elements, but it is mainly used for videos.

Example

Execute JavaScript when the video stops, because it needs to buffer the next frame:

<video onwaiting="myFunction()">

Try it yourself

Syntax

In HTML:

<element onwaiting="myScript">

Try it yourself

In JavaScript:

object.onwaiting = function(){myScript};

Try it yourself

In JavaScript, use the addEventListener() method:

object.addEventListener("waiting", myScript);

Try it yourself

Note:Internet Explorer 8 or earlier versions do not support addEventListener() Method.

Technical Details

Bubble: Unsupported
Cancelable: Unsupported
Event Type: Event
Supported HTML Tags: <audio> and <video>
DOM Version: Level 3 Events

Browser Support

The numbers in the table indicate the first browser version that fully supports the event.

Events Chrome IE Firefox Safari Opera
onwaiting Support 9.0 Support Support Support