From 4bc04c2e45b032fe7a86071e734000c12b4e06fc Mon Sep 17 00:00:00 2001 From: Andy Chen Date: Thu, 2 Feb 2012 09:42:56 -0500 Subject: [PATCH] Added "exitFullScreen" in tech.js. For those browsers that have "supportsFullScreen" false, it would throw "undefined" error when calling "exitFullScreen". --- src/tech.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tech.js b/src/tech.js index 23d106da7..95c24c65a 100644 --- a/src/tech.js +++ b/src/tech.js @@ -171,6 +171,16 @@ _V_.html5 = _V_.PlaybackTech.extend({ } } }, + exitFullScreen: function(){ + try { + this.el.webkitExitFullScreen(); + } catch (e) { + if (e.code == 11) { + // this.warning(VideoJS.warnings.videoNotReady); + _V_.log("VideoJS: Video not ready.") + } + } + }, src: function(src){ this.el.src = src; }, load: function(){ this.el.load(); }, currentSrc: function(){ return this.el.currentSrc; },