The HTML onwaiting Attribute is a event attribute which occurs when the audio or video stops for buffer the next frame. It can be used in audio and video Tag.
Applicable:
Syntax:
<element onwaiting="Script">
Attribute Value: This attribute contains single value script which works when onwaiting event attribute call
Example:
html
<!DOCTYPE html>
< html >
< head >
< title >HTML DOM onwaiting Attribute</ title >
</ head >
< body >
< center >
< h1 style = "color:green" >GeeksforGeeks</ h1 >
< h2 >HTML onwaiting Attribute</ h2 >
< video controls id = "videoID" >
< source src = "GFG.mp4" type = "video/mp4" >
</ video >
</ center >
< script >
document.getElementById(
"videoID").addEventListener("waiting", GFGfun);
function GFGfun() {
alert(" start Buffering");
}
</ script >
</ body >
</ html >
|
Output:
Last Updated :
06 Aug, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...