This repository has been archived by the owner on Jan 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 793
how to import the library using es6 #577
Comments
Version 2.0.0 |
When it's ready? ;) Rough guess: a week or so. |
👍 |
solved? any news? |
This should be working, here's an example var videojs = require('video.js');
require('videojs-contrib-hls');
var videoEl = document.createElement('video');
videoEl.id = 'vid';
videoEl.setAttribute('controls', '');
videoEl.setAttribute('width', '600');
videoEl.setAttribute('height', '300');
videoEl.className = 'video-js vjs-default-skin';
document.body.appendChild(videoEl);
var player = videojs('vid');
player.ready(function() {
player.src({
src: '//d1sh0fycs31s5a.cloudfront.net/eleph/index.m3u8',
type: 'application/x-mpegURL'
});
}); |
Thansk for the answer. |
See #600 for issues with webpack and solutions around it in the meantime. |
I too facing the same issue . |
@gaglage did you find a workaround for your issue? I'm seeing the same error |
Hi @AdamTyler I fixed the issue via #600 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So I'm using es6 and use imports. video.js itself is working but when I want to import 'videojs-contrib-hls' it doesn't see the module.
import vjs from 'videojs-contrib-hls'
throws error.any suggestion?
The text was updated successfully, but these errors were encountered: