1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-05 15:16:06 +02:00

Merge branch '636-incompatible' of git://github.com/jelbourn/video.js into jelbourn-636-incompatible

Conflicts:
	test/unit/player.js
This commit is contained in:
Steve Heffernan 2013-08-27 10:26:32 -07:00
commit 4772e4680b
3 changed files with 28 additions and 2 deletions

View File

@ -89,7 +89,13 @@ vjs.options = {
'loadingSpinner': {},
'bigPlayButton': {},
'controlBar': {}
}
},
// Default message to show when a video cannot be played.
'notSupportedMessage': 'Sorry, no compatible source and playback ' +
'technology were found for this video. Try using another browser ' +
'like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the ' +
'latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'
};
// Set CDN Version of swf

View File

@ -750,7 +750,7 @@ vjs.Player.prototype.src = function(source){
}
} else {
this.el_.appendChild(vjs.createEl('p', {
innerHTML: 'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'
innerHTML: this.options()['notSupportedMessage']
}));
}

View File

@ -329,3 +329,23 @@ test('should allow for tracking when native controls are used', function(){
player.dispose();
});
test('should use custom message when encountering an unsupported video type',
function() {
videojs.options['notSupportedMessage'] = 'Video no go <a href="">link</a>';
var fixture = document.getElementById('qunit-fixture');
var html =
'<video id="example_1">' +
'<source src="fake.foo" type="video/foo">' +
'</video>';
fixture.innerHTML += html;
var tag = document.getElementById('example_1');
var player = new vjs.Player(tag);
var incompatibilityMessage = player.el().getElementsByTagName('p')[0];
equal(incompatibilityMessage.innerHTML, 'Video no go <a href="">link</a>');
player.dispose();
});