1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/third_party/imports/videojs.js
Brett Sun 2921c2adac Handle dependencies that should be split from the main app
Using ES6’s System.import allows webpack to split up the dependency
into its own chunk and load it as necessary. When this is not possible
(ie. when a script expects itself to be dropped into the html), follow
the previous strategy of copying the dependency folder into the build
folder.
2016-06-02 17:14:58 +02:00

19 lines
480 B
JavaScript

import AppConstants from '../../constants/application_constants';
import { InjectInHeadUtils } from '../../utils/inject_utils';
/**
* Imports videojs and its stylesheet.
*
* @return {Promise} Promise that resolves with [video.js, video-js.css] on success.
*/
function importLib() {
return Promise.all([
InjectInHeadUtils.inject(AppConstants.videojs.cssUrl),
InjectInHeadUtils.inject(AppConstants.videojs.sdkUrl)
]);
}
export default { importLib };