This is just because your script is not doing anything which could be manifested as "work". Let's see: first, it obtains the reference to the DOM element "video", correctly. Then you create 6 functions. You simply create 7 objects, nothing else. After that, the scripts runs out of its scope, and eventually, all those 7 objects will be garbage-collected. That's all. The problem is: none of your functions is called. You should call at least one, at the end of your script text, and it should bootstrap all the functionality.
Usually, the script being a child of your
<body>
element is used to add event handlers to some events of some DOM elements. Even after your scrip is finished and runs out of its scope, the elements with event handlers added to some events of those HTML elements will stay in the browser's memory until you close the whole page. It means that your handler functions, too, will be kept in browser's memory and will respond to events triggered by the user. This is how it all works.
In case of video, the minimal script based on your code will work if you do this:
<script type="text/javascript">
myVideo = document.getElementById("video1");
function playPause() {
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
playPause();
</script>
Pay attention for the last line, this is what makes it work.
Good luck,
—SA