diff --git a/src/js/core.js b/src/js/core.js
index 28f047765d..eb58a67d00 100644
--- a/src/js/core.js
+++ b/src/js/core.js
@@ -89,7 +89,13 @@ vjs.options = {
'loadingSpinner': {},
'bigPlayButton': {},
'controlBar': {}
- }
+ },
+
+ // Default message to show when a video cannot be played.
+ incompatibleVideoMessage: 'Sorry, no compatible source and playback ' +
+ 'technology were found for this video. Try using another browser ' +
+ 'like Chrome or download the ' +
+ 'latest Adobe Flash Player.'
};
// Set CDN Version of swf
diff --git a/src/js/player.js b/src/js/player.js
index 097f4c33e8..8e6721a0f1 100644
--- a/src/js/player.js
+++ b/src/js/player.js
@@ -743,7 +743,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 Chrome or download the latest Adobe Flash Player.'
+ innerHTML: this.options()['incompatibleVideoMessage']
}));
}
diff --git a/test/unit/player.js b/test/unit/player.js
index 18fb8d0e26..3be6be399d 100644
--- a/test/unit/player.js
+++ b/test/unit/player.js
@@ -247,3 +247,23 @@ test('should set controls and trigger event', function() {
// player.requestFullScreen();
// });
+test('should use custom message when encountering an unsupported video type',
+ function() {
+ videojs.options['incompatibleVideoMessage'] = 'Video no go';
+ var fixture = document.getElementById('qunit-fixture');
+
+ var html =
+ '';
+
+ fixture.innerHTML += html;
+
+ var tag = document.getElementById('example_1');
+ var player = new vjs.Player(tag);
+
+ var incompatibilityMessage = player.el().getElementsByTagName('p')[0];
+ equal(incompatibilityMessage.textContent, 'Video no go');
+
+ player.dispose();
+});