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