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