Web/API/HTMLMediaElement/waiting event

From Get docs


The waiting event is fired when playback has stopped because of a temporary lack of data.

Bubbles No
Cancelable No
Interface Event
Target Element
Default Action None
Event handler property GlobalEventHandlers.onwaiting
Specification HTML5 media

Examples

These examples add an event listener for the HTMLMediaElement's waiting event, then post a message when that event handler has reacted to the event firing.

Using addEventListener():

const video = document.querySelector('video');

video.addEventListener('waiting', (event) => {
  console.log('Video is waiting for more data.');
});

Using the onwaiting event handler property:

const video = document.querySelector('video');

video.onwaiting = (event) => {
  console.log('Video is waiting for more data.');
};

Specifications

Specification Status
HTML Living StandardThe definition of 'waiting media event' in that specification. Living Standard
HTML5The definition of 'waiting media event' in that specification. Recommendation

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
waiting event Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support


Related Events

See also