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