From 3aae9a0ab1eca0d77c9b58f50e6057ad58e96fda Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 26 Jan 2022 17:59:15 +0100 Subject: [PATCH] openvidu-browser: revert wrong imports --- openvidu-browser/src/OpenVidu/OpenVidu.ts | 2 +- openvidu-browser/src/OpenVidu/Session.ts | 4 ++-- openvidu-browser/src/OpenVidu/Stream.ts | 7 ++----- .../src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/openvidu-browser/src/OpenVidu/OpenVidu.ts b/openvidu-browser/src/OpenVidu/OpenVidu.ts index f91cf5f9..e10a1af9 100644 --- a/openvidu-browser/src/OpenVidu/OpenVidu.ts +++ b/openvidu-browser/src/OpenVidu/OpenVidu.ts @@ -40,7 +40,7 @@ import EventEmitter = require('wolfy87-eventemitter'); /** * @hidden */ -import RpcBuilder from '../OpenViduInternal/KurentoUtils/kurento-jsonrpc'; +import RpcBuilder = require('../OpenViduInternal/KurentoUtils/kurento-jsonrpc'); /** * @hidden diff --git a/openvidu-browser/src/OpenVidu/Session.ts b/openvidu-browser/src/OpenVidu/Session.ts index e7bbe016..94bef3fb 100644 --- a/openvidu-browser/src/OpenVidu/Session.ts +++ b/openvidu-browser/src/OpenVidu/Session.ts @@ -46,11 +46,11 @@ import { PlatformUtils } from '../OpenViduInternal/Utils/Platform'; /** * @hidden */ -import semverMajor from 'semver/functions/major'; +import semverMajor = require('semver/functions/major'); /** * @hidden */ -import semverMinor from 'semver/functions/minor'; +import semverMinor = require('semver/functions/minor'); /** * @hidden diff --git a/openvidu-browser/src/OpenVidu/Stream.ts b/openvidu-browser/src/OpenVidu/Stream.ts index ab085697..4cb8dcff 100644 --- a/openvidu-browser/src/OpenVidu/Stream.ts +++ b/openvidu-browser/src/OpenVidu/Stream.ts @@ -35,7 +35,7 @@ import { PlatformUtils } from '../OpenViduInternal/Utils/Platform'; /** * @hidden */ -import hark from 'hark'; +import hark = require('hark'); /** * @hidden */ @@ -536,15 +536,12 @@ export class Stream { * @hidden */ isSendScreen(): boolean { - if (!this.outboundStreamOpts) { - return false; - } let screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen'; if (platform.isElectron()) { screen = typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' && this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:'); } - return screen; + return !!this.outboundStreamOpts && screen; } /** diff --git a/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts b/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts index 709f2f77..bacc289a 100644 --- a/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts +++ b/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts @@ -15,7 +15,7 @@ * */ -import freeice from 'freeice'; +import freeice = require('freeice'); import { v4 as uuidv4 } from 'uuid'; import { ExceptionEventName } from '../Events/ExceptionEvent'; import { OpenViduLogger } from '../Logger/OpenViduLogger';