HTML | DOM onwaiting event
The onwaiting event in HTML DOM occurs when the video stops for buffer the next frame.
Supported tags:
- audio
- video
Syntax:
- In HTML:
<element onwaiting="Script">
- In JavaScript:
object.onwaiting = function(){Script}; - In JavaScript, using the addEventListener() method:
object.addEventListener("waiting", Script);
Example: Using the addEventListener() method
<!DOCTYPE html> <html> <head> <title>HTML DOM onwaiting Event</title> </head> <body> <center> <h1 style="color:green">GeeksforGeeks</h1> <h2>HTML DOM onwaiting Event</h2> <video controls id="videoID"> <source src="GFG.mp4" type="video/mp4"> </video> </center> <script> document.getElementById( "videoID").addEventListener("waiting", GFGfun); function GFGfun() { alert("Buffering"); } </script> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browsers supported by HTML DOM onwaiting event are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Recommended Posts:
- HTML | DOM onloadedmetadata Event
- HTML | DOM oncanplay Event
- HTML | DOM oncanplaythrough Event
- HTML | DOM onstalled Event
- HTML | DOM onchange Event
- HTML | DOM onkeyup Event
- HTML | DOM onkeypress Event
- HTML | DOM onkeydown Event
- HTML | DOM ontoggle Event
- HTML | DOM touchend Event
- HTML | DOM onloadeddata Event
- HTML | DOM onload Event
- HTML | DOM onblur Event
- HTML | DOM onfocus Event
- HTML | DOM ondragenter Event
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



