videojs-panorama icon indicating copy to clipboard operation
videojs-panorama copied to clipboard

Support for isomorphic & webpack configurations?

Open moshest opened this issue 7 years ago • 1 comments

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.

moshest avatar May 29 '17 08:05 moshest

I manage to use this configuration:

const panorama = (typeof window !== 'undefined') 
  ? require('videojs-panorama') 
  : () => {};

moshest avatar May 29 '17 08:05 moshest