imported module doesn't work in webpack
Opened this issue · 0 comments
Hi,
I'm trying to replace our current videojs implementation with your media-player project. I'm really excited about the accessibility, clarity, and footprint of it.
However, when I try to integrate it in webpack, I get a webpack error
TypeError: mediaplayer__WEBPACK_IMPORTED_MODULE_3___default(...) is not a constructor
My implementation looks like this:
package.json
...
"mediaplayer": "^2.0.1",
...
implementation
import MediaPlayer from 'mediaplayer'; ... this.playerTech = new MediaPlayer(this.videoElement, { prefix: 'media', lang: { play: 'play', pause: 'pause', mute: 'mute', unmute: 'unmute', volume: 'volume', currentTime: 'current time', remainingTime: 'remaining time', enterFullscreen: 'enter fullscreen', leaveFullscreen: 'leave fullscreen', download: 'download' }, svgs: { play: '#symbol-play', pause: '#symbol-pause', mute: '#symbol-mute', unmute: '#symbol-unmute', volume: '#symbol-volume', currentTime: '#symbol-currentTime', remainingTime: '#symbol-remainingTime', enterFullscreen: '#symbol-enterFullscreen', leaveFullscreen: '#symbol-leaveFullscreen', download: '#symbol-download' }, timeDir: 'ltr', volumeDir: 'ltr' });
Any info/insight would be appreciated.
Thanks!