mirror of
https://github.com/videojs/video.js.git
synced 2024-12-14 11:23:30 +02:00
Merge branch 'stable'
Conflicts: dist/video-js/video-js.css dist/video-js/video-js.min.css dist/video-js/video.dev.js dist/video-js/video.js dist/video-js/video.novtt.dev.js dist/video-js/video.novtt.js
This commit is contained in:
commit
999dd60ff4
@ -6,6 +6,9 @@ _(none)_
|
||||
|
||||
--------------------
|
||||
|
||||
## 4.12.3 (2015-02-28)
|
||||
* @heff fixed setting the source to an empty string ([view](https://github.com/videojs/video.js/pull/1905))
|
||||
|
||||
## 4.12.2 (2015-02-27)
|
||||
* @gkatsev fixed disabling of default text tracks ([view](https://github.com/videojs/video.js/pull/1892))
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.12.2",
|
||||
"version": "4.12.3",
|
||||
"main": [
|
||||
"dist/video-js/video.js",
|
||||
"dist/video-js/video-js.css",
|
||||
|
5
build/bin/version
Executable file
5
build/bin/version
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var version = require('../../package.json').version;
|
||||
|
||||
console.log(version);
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.12.2",
|
||||
"version": "4.12.3",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
|
@ -203,7 +203,7 @@
|
||||
[ "npm install", "Ensure dependency updates have been installed" ],
|
||||
[ "grunt test", "Run tests" ],
|
||||
[ "grunt version:{{ release_type }}", "Bump package versions" ],
|
||||
[ "grunt vjs-version", "Return the current VJS Version from the package.json file", "version" ],
|
||||
[ "./build/bin/version", "Return the current VJS Version from the package.json file", "version" ],
|
||||
[ "grunt chg-release:{{ version }}", "Update the changelog with the new release" ],
|
||||
[ "grunt clean:dist", "Clean out the dist folder before the build" ],
|
||||
[ "grunt", "Build the release" ],
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.12.2",
|
||||
"version": "4.12.3",
|
||||
"copyright": "Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
|
@ -496,6 +496,16 @@ vjs.MediaTechController.withSourceHandlers = function(Tech){
|
||||
Tech.prototype.setSource = function(source){
|
||||
var sh = Tech.selectSourceHandler(source);
|
||||
|
||||
if (!sh) {
|
||||
// Fall back to a native source hander when unsupported sources are
|
||||
// deliberately set
|
||||
if (Tech.nativeSourceHandler) {
|
||||
sh = Tech.nativeSourceHandler;
|
||||
} else {
|
||||
vjs.log.error('No source hander found for the current source.');
|
||||
}
|
||||
}
|
||||
|
||||
// Dispose any existing source handler
|
||||
this.disposeSourceHandler();
|
||||
this.off('dispose', this.disposeSourceHandler);
|
||||
|
@ -229,3 +229,25 @@ test('should add the source hanlder interface to a tech', function(){
|
||||
tech.dispose();
|
||||
ok(disposeCalled, 'the handler dispose method was called when the tech was disposed');
|
||||
});
|
||||
|
||||
test('should handle unsupported sources with the source hanlder API', function(){
|
||||
var mockPlayer = {
|
||||
off: this.noop,
|
||||
trigger: this.noop
|
||||
};
|
||||
|
||||
// Define a new tech class
|
||||
var Tech = videojs.MediaTechController.extend();
|
||||
// Extend Tech with source handlers
|
||||
vjs.MediaTechController.withSourceHandlers(Tech);
|
||||
// Create an instance of Tech
|
||||
var tech = new Tech(mockPlayer);
|
||||
|
||||
var usedNative;
|
||||
Tech.nativeSourceHandler = {
|
||||
handleSource: function(){ usedNative = true; }
|
||||
};
|
||||
|
||||
tech.setSource('');
|
||||
ok(usedNative, 'native source handler was used when an unsupported source was set');
|
||||
});
|
Loading…
Reference in New Issue
Block a user