mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
@gkatsev added get and set global options methods. closes #2115
This commit is contained in:
parent
e5595b1e38
commit
b65bad8f20
@ -28,6 +28,7 @@ CHANGELOG
|
||||
* @gkatsev added a sensible toJSON function ([view](https://github.com/videojs/video.js/pull/2114))
|
||||
* @bc-bbay fixed instance where progress bars would go passed 100% ([view](https://github.com/videojs/video.js/pull/2040))
|
||||
* @eXon began Tech 2.0 work, improved how tech events are handled by the player ([view](https://github.com/videojs/video.js/pull/2057))
|
||||
* @gkatsev added get and set global options methods ([view](https://github.com/videojs/video.js/pull/2115))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -10,7 +10,11 @@
|
||||
|
||||
<!-- Set the location of the flash SWF -->
|
||||
<script>
|
||||
videojs.options.flash.swf = '../build/temp/video-js.swf';
|
||||
videojs.setGlobalOptions({
|
||||
flash: {
|
||||
swf: '../build/temp/video-js.swf'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -18,6 +18,7 @@ import * as Util from './util.js';
|
||||
import Player from './player';
|
||||
import extendsFn from './extends.js';
|
||||
import plugin from './plugins.js';
|
||||
import options from './options.js';
|
||||
|
||||
if (typeof HTMLVideoElement === 'undefined') {
|
||||
document.createElement('video');
|
||||
@ -42,6 +43,11 @@ videojs.players = Player.players;
|
||||
|
||||
videojs.extends = extendsFn;
|
||||
|
||||
videojs.getGlobalOptions = () => options;
|
||||
videojs.setGlobalOptions = function(newOptions) {
|
||||
Lib.util.mergeOptions(options, newOptions);
|
||||
};
|
||||
|
||||
videojs.plugin = plugin;
|
||||
|
||||
// REMOVING: We probably should not include this in 5.0 thought it would make it
|
||||
|
Loading…
x
Reference in New Issue
Block a user