added AMD support

This commit is contained in:
Artem Suschev 2015-10-26 19:25:56 +03:00
parent 5858c346b8
commit c2c9b10a58

View file

@ -2,6 +2,15 @@
* Copyright (c) 2015 Kasper Moskwiak * Copyright (c) 2015 Kasper Moskwiak
* Modified by Pierre Kraft * Modified by Pierre Kraft
* Licensed under the Apache-2.0 license. */ * Licensed under the Apache-2.0 license. */
(function() {
var videojs = null;
if(typeof window.videojs === 'undefined' && typeof require === 'function') {
videojs = require('videojs');
} else {
videojs = window.videojs;
}
(function(window, videojs) { (function(window, videojs) {
/* jshint eqnull: true*/ /* jshint eqnull: true*/
'use strict'; 'use strict';
@ -219,4 +228,5 @@
// register the plugin // register the plugin
videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher); videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
})(window, window.videojs); })(window, videojs);
})();