2 <script src=
"../../media/media-file.js"></script>
4 function canplaythrough() {
5 parent
.postMessage("Video loaded", "*");
8 function fullscreenChanged() {
9 parent
.postMessage("SUCCEED - entered full screen!", "*");
13 var video
= document
.getElementById('video');
14 var mediaFile
= findMediaFile("video", "../../media/content/test");
15 video
.src
= mediaFile
;
16 video
.addEventListener('canplaythrough', canplaythrough
);
17 video
.addEventListener('webkitfullscreenchange', fullscreenChanged
);
18 video
.onclick = function(event
) {
19 video
.webkitRequestFullscreen();
20 // cancel the activation behavior (click to play/pause)
21 event
.preventDefault();
25 <video id=
"video" controls
width=
"320" height=
"240"></video>