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
10 lines
236 B
TypeScript
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 })
|