From 87f43537d2c4a60cf7ecfccb9dbe85fc67039790 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Tue, 30 May 2023 13:44:53 +0200 Subject: [PATCH] openvidu-components: Fixed zoom in/out icons --- .../src/lib/components/stream/stream.component.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts index 0ef5ff3b..3f25df87 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/stream/stream.component.ts @@ -186,14 +186,16 @@ export class StreamComponent implements OnInit { * @ignore */ toggleVideoEnlarged() { - if (!!this._stream.streamManager?.stream?.connection?.connectionId) { - if (this.openviduService.isMyOwnConnection(this._stream.streamManager?.stream?.connection?.connectionId)) { - this.participantService.toggleMyVideoEnlarged(this._stream.streamManager?.stream?.connection?.connectionId); + const connectionId = this._stream.streamManager?.stream?.connection?.connectionId; + if (Boolean(connectionId)) { + if (this.openviduService.isMyOwnConnection(connectionId)) { + this.participantService.toggleMyVideoEnlarged(connectionId); } else { - this.participantService.toggleRemoteVideoEnlarged(this._stream.streamManager?.stream?.connection?.connectionId); + this.participantService.toggleRemoteVideoEnlarged(connectionId); } + this.checkVideoEnlarged(); + this.layoutService.update(); } - this.layoutService.update(); } /**