diff --git a/openvidu-browser/src/OpenVidu/Publisher.ts b/openvidu-browser/src/OpenVidu/Publisher.ts index d502c2dc..32ffa633 100644 --- a/openvidu-browser/src/OpenVidu/Publisher.ts +++ b/openvidu-browser/src/OpenVidu/Publisher.ts @@ -81,7 +81,7 @@ export class Publisher extends StreamManager { /** * @hidden */ - constructor(targEl: string | HTMLElement, properties: PublisherProperties, openvidu: OpenVidu) { + constructor(targEl: string | HTMLElement | undefined, properties: PublisherProperties, openvidu: OpenVidu) { super(new Stream((!!openvidu.session) ? openvidu.session : new Session(openvidu), { publisherProperties: properties, mediaConstraints: {} }), targEl); platform = PlatformUtils.getInstance(); this.properties = properties; diff --git a/openvidu-browser/src/OpenVidu/Subscriber.ts b/openvidu-browser/src/OpenVidu/Subscriber.ts index b6317708..8210b91a 100644 --- a/openvidu-browser/src/OpenVidu/Subscriber.ts +++ b/openvidu-browser/src/OpenVidu/Subscriber.ts @@ -40,7 +40,7 @@ export class Subscriber extends StreamManager { /** * @hidden */ - constructor(stream: Stream, targEl: string | HTMLElement, properties: SubscriberProperties) { + constructor(stream: Stream, targEl: string | HTMLElement | undefined, properties: SubscriberProperties) { super(stream, targEl); this.element = this.targetElement; this.stream = stream;