OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 function goFullscreen(id) { |
| 6 var element = document.getElementById(id); |
| 7 if (element.webkitRequestFullScreen) { |
| 8 element.webkitRequestFullScreen(); |
| 9 } |
| 10 } |
| 11 |
| 12 function playVideo() { |
| 13 document.getElementById('video').play(); |
| 14 } |
| 15 |
| 16 addEventListener('DOMContentLoaded', function() { |
| 17 document.addEventListener('webkitfullscreenchange', function() { |
| 18 javaOnEnterFullscreen.notifyJava(); |
| 19 }, false); |
| 20 document.getElementById('video').addEventListener('play', function() { |
| 21 javaOnPlayObserver.notifyJava(); |
| 22 }, false); |
| 23 document.addEventListener('webkitfullscreenerror', function() { |
| 24 javaFullScreenErrorObserver.notifyJava(); |
| 25 }, false); |
| 26 }, false); |
| 27 |
OLD | NEW |