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:
commit
4772e4680b
@ -89,7 +89,13 @@ vjs.options = {
|
|||||||
'loadingSpinner': {},
|
'loadingSpinner': {},
|
||||||
'bigPlayButton': {},
|
'bigPlayButton': {},
|
||||||
'controlBar': {}
|
'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
|
// Set CDN Version of swf
|
||||||
|
@ -750,7 +750,7 @@ vjs.Player.prototype.src = function(source){
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.el_.appendChild(vjs.createEl('p', {
|
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']
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,3 +329,23 @@ test('should allow for tracking when native controls are used', function(){
|
|||||||
player.dispose();
|
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();
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user