1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-17 21:18:27 +02:00

Merge pull request #1080 from tchakabam/master

Fixes null pointer exception and improves behavior of src() of when to trigger ready event
This commit is contained in:
Matthew McClure 2014-03-13 14:18:36 -07:00
commit 32e4d4c9d0
2 changed files with 9 additions and 5 deletions

View File

@ -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"

View File

@ -1048,6 +1048,7 @@ vjs.Player.prototype.src = function(source){
this.el_.appendChild(vjs.createEl('p', {
innerHTML: this.options()['notSupportedMessage']
}));
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: '' ... }
@ -1279,10 +1280,13 @@ 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(this.tech) {
this.tech.one('mousemove', function(e){
e.stopPropagation();
e.preventDefault();
});
}
this.removeClass('vjs-user-active');
this.addClass('vjs-user-inactive');
this.trigger('userinactive');