Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / resources / video.html
blobaba93ee2f0ba17dbab2f61100ec0aa112efeec31
1 <!DOCTYPE html>
2 <script src="../../media/media-file.js"></script>
3 <script>
4 function canplaythrough() {
5 parent.postMessage("Video loaded", "*");
8 function fullscreenChanged() {
9 parent.postMessage("SUCCEED - entered full screen!", "*");
12 onload = function() {
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();
24 </script>
25 <video id="video" controls width="320" height="240"></video>