From 7a4c602be0e11b237538e9ee945f17388b5fa582 Mon Sep 17 00:00:00 2001 From: tchakabam Date: Tue, 11 Mar 2014 16:20:12 +0100 Subject: [PATCH 1/6] Fixes exception when userActive called but tech not initialized --- src/js/player.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/js/player.js b/src/js/player.js index 5d0bf574a..ef60ff6b6 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -1273,10 +1273,14 @@ vjs.Player.prototype.userActive = function(bool){ // // When this gets resolved in ALL browsers it can be removed // https://code.google.com/p/chromium/issues/detail?id=103041 - this.tech.one('mousemove', function(e){ - e.stopPropagation(); - e.preventDefault(); - }); + + if(typeof(this.tech) != 'undefined') { + this.tech.one('mousemove', function(e){ + e.stopPropagation(); + e.preventDefault(); + }); + } + this.removeClass('vjs-user-active'); this.addClass('vjs-user-inactive'); this.trigger('userinactive'); From 02155c6b139762c0a8298e5062f89268bd27c357 Mon Sep 17 00:00:00 2001 From: tchakabam Date: Tue, 11 Mar 2014 16:47:51 +0100 Subject: [PATCH 2/6] Trigger ready callback even when no tech available so client app can display custom fallback message --- src/js/player.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/player.js b/src/js/player.js index ef60ff6b6..477d8fb0d 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -1043,6 +1043,7 @@ vjs.Player.prototype.src = function(source){ this.el_.appendChild(vjs.createEl('p', { innerHTML: this.options()['notSupportedMessage'] })); + this.triggerReady(); } // Case: Source object { src: '', type: '' ... } From cbefd37acf1bc5a5ba4412dcf2d774c60e279aa3 Mon Sep 17 00:00:00 2001 From: Stephan Hesse Date: Thu, 13 Mar 2014 00:45:06 +0100 Subject: [PATCH 3/6] Added comment to triggerReady call --- src/js/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 477d8fb0d..71a31c068 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -1043,7 +1043,7 @@ vjs.Player.prototype.src = function(source){ this.el_.appendChild(vjs.createEl('p', { innerHTML: this.options()['notSupportedMessage'] })); - this.triggerReady(); + this.triggerReady(); // we could not find an appropriate tech, but let's still notify the delegate that this is it } // Case: Source object { src: '', type: '' ... } From 26f6f4b0ea17eb7da201a19f3174d2949e40fe21 Mon Sep 17 00:00:00 2001 From: Stephan Hesse Date: Thu, 13 Mar 2014 00:46:00 +0100 Subject: [PATCH 4/6] Enough to check for this.tech != null --- src/js/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 71a31c068..812e4f497 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -1275,7 +1275,7 @@ vjs.Player.prototype.userActive = function(bool){ // When this gets resolved in ALL browsers it can be removed // https://code.google.com/p/chromium/issues/detail?id=103041 - if(typeof(this.tech) != 'undefined') { + if(this.tech) { this.tech.one('mousemove', function(e){ e.stopPropagation(); e.preventDefault(); From 4051a9cbeee55c3a31781604da7e68588cd61065 Mon Sep 17 00:00:00 2001 From: Stephan Hesse Date: Thu, 13 Mar 2014 18:59:51 +0100 Subject: [PATCH 5/6] Fixed compile: removed trailing whitespace --- src/js/player.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 812e4f497..3956e0225 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -1274,7 +1274,6 @@ vjs.Player.prototype.userActive = function(bool){ // // When this gets resolved in ALL browsers it can be removed // https://code.google.com/p/chromium/issues/detail?id=103041 - if(this.tech) { this.tech.one('mousemove', function(e){ e.stopPropagation(); From d289a336b8be905553cf3d5e2e8864beec6fd92b Mon Sep 17 00:00:00 2001 From: Stephan Hesse Date: Thu, 13 Mar 2014 22:16:39 +0100 Subject: [PATCH 6/6] Fix bower version (was 4.4.0 in bower.json but should be same as semver tag) --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 9262d01df..15f276b68 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "4.4.0", + "version": "4.4.3", "main": [ "dist/video-js/video.js", "dist/video-js/video-js.css"