From 6d624209a0665ac703d373ffb47b65e83d7e090f Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Thu, 24 Jun 2021 15:07:56 +0200 Subject: [PATCH] openvidu-testapp: add reconnect button --- .../app/components/video/video.component.css | 16 ++++++++++------ .../app/components/video/video.component.html | 18 +++++++++++------- .../app/components/video/video.component.ts | 6 ++++++ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/openvidu-testapp/src/app/components/video/video.component.css b/openvidu-testapp/src/app/components/video/video.component.css index d58176190..669916b49 100644 --- a/openvidu-testapp/src/app/components/video/video.component.css +++ b/openvidu-testapp/src/app/components/video/video.component.css @@ -26,10 +26,10 @@ p { } .material-icons { - font-size: 17px; - width: 17px; - height: 17px; - line-height: 20px; + font-size: 14px; + width: 14px; + height: 14px; + line-height: 16px; } .video-btn { @@ -37,7 +37,7 @@ p { background: rgba(255, 255, 255, 0.75); cursor: pointer; padding: 0; - height: 20px; + height: 16px; float: left; } @@ -64,6 +64,10 @@ p { float: right; } +.filter-btn { + float: right; +} + .top-left-rounded { border-top-left-radius: 2px; } @@ -94,6 +98,6 @@ p { .bottom-div { position: absolute; bottom: 0; - height: 20px; + height: 16px; width: 100%; } \ No newline at end of file diff --git a/openvidu-testapp/src/app/components/video/video.component.html b/openvidu-testapp/src/app/components/video/video.component.html index 0a9830f85..aa59f1fd8 100644 --- a/openvidu-testapp/src/app/components/video/video.component.html +++ b/openvidu-testapp/src/app/components/video/video.component.html @@ -5,6 +5,9 @@ + @@ -24,8 +27,8 @@ - + @@ -60,17 +66,15 @@ (click)="subUnsubAudio()"> - + - - diff --git a/openvidu-testapp/src/app/components/video/video.component.ts b/openvidu-testapp/src/app/components/video/video.component.ts index 97ec6c709..5d8168712 100644 --- a/openvidu-testapp/src/app/components/video/video.component.ts +++ b/openvidu-testapp/src/app/components/video/video.component.ts @@ -327,6 +327,12 @@ export class VideoComponent implements OnInit, OnDestroy { this.publisherChanged = !this.publisherChanged; } + reconnect() { + this.streamManager.stream.reconnect() + .then(() => console.log(`Stream ${this.streamManager.stream} (${this.streamManager.remote ? 'Subscriber' : 'Publisher'}) successfully reconnected`)) + .catch(error => console.error(`Error while reconnecting stream ${this.streamManager.stream} (${this.streamManager.remote ? 'Subscriber' : 'Publisher'})`, error)); + } + updateSubscriberEvents(oldValues) { const sub: Subscriber = this.streamManager;