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

Opentok throws error with angular server side rendering #77

Closed
belall-shaikh opened this issue Sep 25, 2018 · 2 comments
Closed

Opentok throws error with angular server side rendering #77

belall-shaikh opened this issue Sep 25, 2018 · 2 comments

Comments

@belall-shaikh
Copy link

Using opentok with angular server side rendering throws following error.
ReferenceError: window is not defined.

Error origin :
Exploring the code, I found that the error is originated from following function

var isOldIE = memoize(function () {
// Test for IE <= 9 as proposed by Browserhacks
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
// Tests for existence of standard globals is to allow style-loader
// to operate correctly into non-standard environments
// @see webpack-contrib/style-loader#177
return window && document && document.all && !window.atob;
});

There are also other references to document, window and other browser specific components, that breaks the angular app if it is using server side rendering.

@belall-shaikh
Copy link
Author

It has been almost more than 6 months. Is this going to be resolved?

@aullman
Copy link
Contributor

aullman commented Apr 10, 2019

We're not currently planning to support angular server side rendering. I'm not sure how it would work anyway. Are you able to avoid trying to use opentok.js when doing server side rendering? It doesn't really make sense to render a Publisher or Subscriber on the server side right?

@aullman aullman closed this as completed Apr 10, 2019
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

2 participants