Juan Navarro 2b70c12be6 openvidu-browser: Node.js platform: Use globalThis instead of window
While `window` is specific to the web browser, and `global` is specific
to Node.js, the standard `globalThis` global variable is common to both
platforms.

Thus, to make openvidu-browser more portable to Node.js, it's better to
use the common name.

More info:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
2022-07-27 16:53:25 +02:00

10 lines
236 B
TypeScript

import { OpenVidu } from './OpenVidu/OpenVidu';
import { JL } from 'jsnlog';
if (typeof globalThis !== 'undefined') {
globalThis['OpenVidu'] = OpenVidu;
}
// Disable jsnlog when library is loaded
JL.setOptions({ enabled: false })