HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> video{ width:100%; height:330px } </style> </head> <body> <video id="myVid" onemptied="myFunction()" controls> <source src="/hawk.mp4" type="video/mp4"> </video> <button onclick="myEmptied()">Empty this video link</button> <script> function myFunction() { alert("This video link is emptied"); } function myEmptied(){ document.getElementById("myVid").src = ""; } </script> </body> </html>
OUTPUT
×

Save as Private