videojs-panorama
videojs-panorama copied to clipboard
Support for isomorphic & webpack configurations?
I'm trying to import the package videojs-panorama
on isomorphic React.js configuration but it's failed do to usage of window
on the code:
var Detector = {
canvas: !!window.CanvasRenderingContext2D,
Seems like this package has no support for server-side compilation.
I manage to use this configuration:
const panorama = (typeof window !== 'undefined')
? require('videojs-panorama')
: () => {};