Horje

How to set up HTML onwaiting Attribute

A example of video.
index.html
Example: HTML
<!DOCTYPE html> 
<html> 

<head> 
	<title>HTML DOM onwaiting Attribute</title> 
</head> 

<body> 
	<center> 
		<h1 style="color:green">Horje</h1> 
		<h2>HTML onwaiting Attribute</h2> 

		<video controls id="videoID"> 
			<source src="https://www.sample-videos.com/video321/mp4/240/big_buck_bunny_240p_30mb.mp4" type="video/mp4"> 
		</video> 

	</center> 
	<script> 
		document.getElementById( 
		"videoID").addEventListener("waiting", GFGfun); 

		function GFGfun() { 
			alert(" start Buffering"); 
		} 
	</script> 

</body> 

</html>

Output should be:

How to set up HTML onwaiting Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin