Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for isomorphic & webpack configurations? #99

Open
moshest opened this issue May 29, 2017 · 1 comment
Open

Support for isomorphic & webpack configurations? #99

moshest opened this issue May 29, 2017 · 1 comment

Comments

@moshest
Copy link

moshest commented May 29, 2017

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
Copy link
Author

moshest commented May 29, 2017

I manage to use this configuration:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant