From 02cccb975168b2158555794360bfaaf2a6655620 Mon Sep 17 00:00:00 2001 From: cruizba Date: Tue, 8 Sep 2020 14:26:50 +0200 Subject: [PATCH] openvidu-testapp: Add button to show codec for each video [Only works in Chrome] --- openvidu-testapp/src/app/app.module.ts | 7 +++-- .../show-codec-dialog.component.ts | 27 +++++++++++++++++ .../app/components/video/video.component.html | 5 +++- .../app/components/video/video.component.ts | 29 +++++++++++++++++-- 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 openvidu-testapp/src/app/components/dialogs/show-codec-dialog/show-codec-dialog.component.ts diff --git a/openvidu-testapp/src/app/app.module.ts b/openvidu-testapp/src/app/app.module.ts index 61f3323a..419f888b 100644 --- a/openvidu-testapp/src/app/app.module.ts +++ b/openvidu-testapp/src/app/app.module.ts @@ -25,6 +25,7 @@ import { EventsDialogComponent } from './components/dialogs/events-dialog/events import { PublisherPropertiesDialogComponent } from './components/dialogs/publisher-properties-dialog/publisher-properties-dialog.component'; import { ScenarioPropertiesDialogComponent } from './components/dialogs/scenario-properties-dialog/scenario-properties-dialog.component'; import { FilterDialogComponent } from './components/dialogs/filter-dialog/filter-dialog.component'; +import { ShowCodecDialogComponent } from './components/dialogs/show-codec-dialog/show-codec-dialog.component'; import { OpenviduRestService } from './services/openvidu-rest.service'; import { OpenviduParamsService } from './services/openvidu-params.service'; @@ -49,7 +50,8 @@ import { MuteSubscribersService } from './services/mute-subscribers.service'; ScenarioPropertiesDialogComponent, FilterDialogComponent, UsersTableComponent, - TableVideoComponent + TableVideoComponent, + ShowCodecDialogComponent ], imports: [ BrowserModule, @@ -74,7 +76,8 @@ import { MuteSubscribersService } from './services/mute-subscribers.service'; LocalRecordingDialogComponent, PublisherPropertiesDialogComponent, ScenarioPropertiesDialogComponent, - FilterDialogComponent + FilterDialogComponent, + ShowCodecDialogComponent ], bootstrap: [AppComponent] }) diff --git a/openvidu-testapp/src/app/components/dialogs/show-codec-dialog/show-codec-dialog.component.ts b/openvidu-testapp/src/app/components/dialogs/show-codec-dialog/show-codec-dialog.component.ts new file mode 100644 index 00000000..c5b9678a --- /dev/null +++ b/openvidu-testapp/src/app/components/dialogs/show-codec-dialog/show-codec-dialog.component.ts @@ -0,0 +1,27 @@ +import { Component, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +@Component({ + selector: 'app-codec-used-dialog', + template: ` +
+

Used Codec: {{usedVideoCodec}}

+ + +
+ `, + styles: [` + #app-codec-dialog-container { + text-align: center + } + `] +}) +export class ShowCodecDialogComponent { + + usedVideoCodec; + + constructor(public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data) { + this.usedVideoCodec = data.usedVideoCodec; + } +} \ 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 7ffe5117..4485d150 100644 --- a/openvidu-testapp/src/app/components/video/video.component.html +++ b/openvidu-testapp/src/app/components/video/video.component.html @@ -5,7 +5,7 @@ - @@ -44,6 +44,9 @@ +