3 <body bgcolor=
"Silver">
4 <video id='video1'
src=
"test.mp4" controls
></video>
6 var video
= document
.getElementById('video1');
7 var mediaElement
= video
;
9 video
.oncanplaythrough = function() {
10 document
.title
= 'ready_to_play';
13 video
.onended = function(e
) {
14 document
.title
= 'ended';
17 function playvideo() {
22 <button id=
"button1" onclick=
"playvideo()">Click me
</button>