mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: make update interval for dialog optional
parent
61fbf9850b
commit
ce47224400
|
@ -4,15 +4,16 @@ import { take } from 'rxjs/operators';
|
||||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-info-dialog',
|
selector: 'app-info-dialog',
|
||||||
templateUrl: './info-dialog.component.html',
|
templateUrl: './info-dialog.component.html',
|
||||||
styleUrls: ['./info-dialog.component.css'],
|
styleUrls: ['./info-dialog.component.css'],
|
||||||
standalone: false
|
standalone: false,
|
||||||
})
|
})
|
||||||
export class InfoDialogComponent implements OnDestroy {
|
export class InfoDialogComponent implements OnDestroy {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
updateFunction: () => Promise<string>;
|
updateFunction: () => Promise<string>;
|
||||||
|
updateInterval: number;
|
||||||
|
|
||||||
textAreaValue: string;
|
textAreaValue: string;
|
||||||
|
|
||||||
|
@ -26,17 +27,22 @@ export class InfoDialogComponent implements OnDestroy {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
updateFunction: () => Promise<string>;
|
updateFunction: () => Promise<string>;
|
||||||
|
updateInterval: number;
|
||||||
},
|
},
|
||||||
private _ngZone: NgZone
|
private _ngZone: NgZone
|
||||||
) {
|
) {
|
||||||
this.title = data.title;
|
this.title = data.title;
|
||||||
this.subtitle = data.subtitle;
|
this.subtitle = data.subtitle;
|
||||||
this.updateFunction = data.updateFunction;
|
this.updateFunction = data.updateFunction;
|
||||||
|
this.updateInterval = data.updateInterval;
|
||||||
|
|
||||||
this.updateValue();
|
this.updateValue();
|
||||||
this.interval = setInterval(() => {
|
|
||||||
this.updateValue();
|
if (this.updateInterval) {
|
||||||
}, 700);
|
this.interval = setInterval(() => {
|
||||||
|
this.updateValue();
|
||||||
|
}, this.updateInterval);
|
||||||
|
}
|
||||||
|
|
||||||
// this.publisher
|
// this.publisher
|
||||||
// .getSenders()
|
// .getSenders()
|
||||||
|
|
|
@ -210,7 +210,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.Connected) !==
|
this.roomEvents.get(RoomEvent.Connected) !==
|
||||||
oldValues.get(RoomEvent.Connected)
|
oldValues.get(RoomEvent.Connected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.Connected);
|
this.room?.removeAllListeners(RoomEvent.Connected);
|
||||||
if (this.roomEvents.get(RoomEvent.Connected)) {
|
if (this.roomEvents.get(RoomEvent.Connected)) {
|
||||||
|
@ -235,7 +235,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.Reconnecting) !==
|
this.roomEvents.get(RoomEvent.Reconnecting) !==
|
||||||
oldValues.get(RoomEvent.Reconnecting)
|
oldValues.get(RoomEvent.Reconnecting)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.Reconnecting);
|
this.room?.removeAllListeners(RoomEvent.Reconnecting);
|
||||||
if (this.roomEvents.get(RoomEvent.Reconnecting)) {
|
if (this.roomEvents.get(RoomEvent.Reconnecting)) {
|
||||||
|
@ -248,7 +248,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.Reconnected) !==
|
this.roomEvents.get(RoomEvent.Reconnected) !==
|
||||||
oldValues.get(RoomEvent.Reconnected)
|
oldValues.get(RoomEvent.Reconnected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.Reconnected);
|
this.room?.removeAllListeners(RoomEvent.Reconnected);
|
||||||
if (this.roomEvents.get(RoomEvent.Reconnected)) {
|
if (this.roomEvents.get(RoomEvent.Reconnected)) {
|
||||||
|
@ -261,7 +261,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.Disconnected) !==
|
this.roomEvents.get(RoomEvent.Disconnected) !==
|
||||||
oldValues.get(RoomEvent.Disconnected)
|
oldValues.get(RoomEvent.Disconnected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.Disconnected);
|
this.room?.removeAllListeners(RoomEvent.Disconnected);
|
||||||
if (this.roomEvents.get(RoomEvent.Disconnected)) {
|
if (this.roomEvents.get(RoomEvent.Disconnected)) {
|
||||||
|
@ -278,7 +278,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ConnectionStateChanged) !==
|
this.roomEvents.get(RoomEvent.ConnectionStateChanged) !==
|
||||||
oldValues.get(RoomEvent.ConnectionStateChanged)
|
oldValues.get(RoomEvent.ConnectionStateChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ConnectionStateChanged);
|
this.room?.removeAllListeners(RoomEvent.ConnectionStateChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ConnectionStateChanged)) {
|
if (this.roomEvents.get(RoomEvent.ConnectionStateChanged)) {
|
||||||
|
@ -298,7 +298,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.MediaDevicesChanged) !==
|
this.roomEvents.get(RoomEvent.MediaDevicesChanged) !==
|
||||||
oldValues.get(RoomEvent.MediaDevicesChanged)
|
oldValues.get(RoomEvent.MediaDevicesChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.MediaDevicesChanged);
|
this.room?.removeAllListeners(RoomEvent.MediaDevicesChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.MediaDevicesChanged)) {
|
if (this.roomEvents.get(RoomEvent.MediaDevicesChanged)) {
|
||||||
|
@ -311,7 +311,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantConnected) !==
|
this.roomEvents.get(RoomEvent.ParticipantConnected) !==
|
||||||
oldValues.get(RoomEvent.ParticipantConnected)
|
oldValues.get(RoomEvent.ParticipantConnected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantConnected);
|
this.room?.removeAllListeners(RoomEvent.ParticipantConnected);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantConnected)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantConnected)) {
|
||||||
|
@ -331,7 +331,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantActive) !==
|
this.roomEvents.get(RoomEvent.ParticipantActive) !==
|
||||||
oldValues.get(RoomEvent.ParticipantActive)
|
oldValues.get(RoomEvent.ParticipantActive)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantActive);
|
this.room?.removeAllListeners(RoomEvent.ParticipantActive);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantActive)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantActive)) {
|
||||||
|
@ -351,7 +351,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantDisconnected) !==
|
this.roomEvents.get(RoomEvent.ParticipantDisconnected) !==
|
||||||
oldValues.get(RoomEvent.ParticipantDisconnected)
|
oldValues.get(RoomEvent.ParticipantDisconnected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantDisconnected);
|
this.room?.removeAllListeners(RoomEvent.ParticipantDisconnected);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantDisconnected)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantDisconnected)) {
|
||||||
|
@ -372,7 +372,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackPublished) !==
|
this.roomEvents.get(RoomEvent.TrackPublished) !==
|
||||||
oldValues.get(RoomEvent.TrackPublished)
|
oldValues.get(RoomEvent.TrackPublished)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackPublished);
|
this.room?.removeAllListeners(RoomEvent.TrackPublished);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackPublished)) {
|
if (this.roomEvents.get(RoomEvent.TrackPublished)) {
|
||||||
|
@ -398,7 +398,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackSubscribed) !==
|
this.roomEvents.get(RoomEvent.TrackSubscribed) !==
|
||||||
oldValues.get(RoomEvent.TrackSubscribed)
|
oldValues.get(RoomEvent.TrackSubscribed)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackSubscribed);
|
this.room?.removeAllListeners(RoomEvent.TrackSubscribed);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackSubscribed)) {
|
if (this.roomEvents.get(RoomEvent.TrackSubscribed)) {
|
||||||
|
@ -437,7 +437,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackSubscriptionFailed) !==
|
this.roomEvents.get(RoomEvent.TrackSubscriptionFailed) !==
|
||||||
oldValues.get(RoomEvent.TrackSubscriptionFailed)
|
oldValues.get(RoomEvent.TrackSubscriptionFailed)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackSubscriptionFailed);
|
this.room?.removeAllListeners(RoomEvent.TrackSubscriptionFailed);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackSubscriptionFailed)) {
|
if (this.roomEvents.get(RoomEvent.TrackSubscriptionFailed)) {
|
||||||
|
@ -451,7 +451,8 @@ export class OpenviduInstanceComponent {
|
||||||
this.updateEventList(
|
this.updateEventList(
|
||||||
RoomEvent.TrackSubscriptionFailed,
|
RoomEvent.TrackSubscriptionFailed,
|
||||||
{ trackSid, participant },
|
{ trackSid, participant },
|
||||||
`${participant.identity} (${trackSid}). Reason: ${reason ? SubscriptionError[reason] : reason
|
`${participant.identity} (${trackSid}). Reason: ${
|
||||||
|
reason ? SubscriptionError[reason] : reason
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -462,7 +463,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackUnpublished) !==
|
this.roomEvents.get(RoomEvent.TrackUnpublished) !==
|
||||||
oldValues.get(RoomEvent.TrackUnpublished)
|
oldValues.get(RoomEvent.TrackUnpublished)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackUnpublished);
|
this.room?.removeAllListeners(RoomEvent.TrackUnpublished);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackUnpublished)) {
|
if (this.roomEvents.get(RoomEvent.TrackUnpublished)) {
|
||||||
|
@ -485,7 +486,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackUnsubscribed) !==
|
this.roomEvents.get(RoomEvent.TrackUnsubscribed) !==
|
||||||
oldValues.get(RoomEvent.TrackUnsubscribed)
|
oldValues.get(RoomEvent.TrackUnsubscribed)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackUnsubscribed);
|
this.room?.removeAllListeners(RoomEvent.TrackUnsubscribed);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackUnsubscribed)) {
|
if (this.roomEvents.get(RoomEvent.TrackUnsubscribed)) {
|
||||||
|
@ -526,7 +527,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackMuted) !==
|
this.roomEvents.get(RoomEvent.TrackMuted) !==
|
||||||
oldValues.get(RoomEvent.TrackMuted)
|
oldValues.get(RoomEvent.TrackMuted)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackMuted);
|
this.room?.removeAllListeners(RoomEvent.TrackMuted);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackMuted)) {
|
if (this.roomEvents.get(RoomEvent.TrackMuted)) {
|
||||||
|
@ -546,7 +547,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackUnmuted) !==
|
this.roomEvents.get(RoomEvent.TrackUnmuted) !==
|
||||||
oldValues.get(RoomEvent.TrackUnmuted)
|
oldValues.get(RoomEvent.TrackUnmuted)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackUnmuted);
|
this.room?.removeAllListeners(RoomEvent.TrackUnmuted);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackUnmuted)) {
|
if (this.roomEvents.get(RoomEvent.TrackUnmuted)) {
|
||||||
|
@ -566,7 +567,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.LocalTrackPublished) !==
|
this.roomEvents.get(RoomEvent.LocalTrackPublished) !==
|
||||||
oldValues.get(RoomEvent.LocalTrackPublished)
|
oldValues.get(RoomEvent.LocalTrackPublished)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.LocalTrackPublished);
|
this.room?.removeAllListeners(RoomEvent.LocalTrackPublished);
|
||||||
if (this.roomEvents.get(RoomEvent.LocalTrackPublished)) {
|
if (this.roomEvents.get(RoomEvent.LocalTrackPublished)) {
|
||||||
|
@ -594,7 +595,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.LocalTrackUnpublished) !==
|
this.roomEvents.get(RoomEvent.LocalTrackUnpublished) !==
|
||||||
oldValues.get(RoomEvent.LocalTrackUnpublished)
|
oldValues.get(RoomEvent.LocalTrackUnpublished)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.LocalTrackUnpublished);
|
this.room?.removeAllListeners(RoomEvent.LocalTrackUnpublished);
|
||||||
if (this.roomEvents.get(RoomEvent.LocalTrackUnpublished)) {
|
if (this.roomEvents.get(RoomEvent.LocalTrackUnpublished)) {
|
||||||
|
@ -618,7 +619,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.LocalAudioSilenceDetected) !==
|
this.roomEvents.get(RoomEvent.LocalAudioSilenceDetected) !==
|
||||||
oldValues.get(RoomEvent.LocalAudioSilenceDetected)
|
oldValues.get(RoomEvent.LocalAudioSilenceDetected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.LocalAudioSilenceDetected);
|
this.room?.removeAllListeners(RoomEvent.LocalAudioSilenceDetected);
|
||||||
if (this.roomEvents.get(RoomEvent.LocalAudioSilenceDetected)) {
|
if (this.roomEvents.get(RoomEvent.LocalAudioSilenceDetected)) {
|
||||||
|
@ -638,7 +639,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantMetadataChanged) !==
|
this.roomEvents.get(RoomEvent.ParticipantMetadataChanged) !==
|
||||||
oldValues.get(RoomEvent.ParticipantMetadataChanged)
|
oldValues.get(RoomEvent.ParticipantMetadataChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantMetadataChanged);
|
this.room?.removeAllListeners(RoomEvent.ParticipantMetadataChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantMetadataChanged)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantMetadataChanged)) {
|
||||||
|
@ -658,7 +659,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantNameChanged) !==
|
this.roomEvents.get(RoomEvent.ParticipantNameChanged) !==
|
||||||
oldValues.get(RoomEvent.ParticipantNameChanged)
|
oldValues.get(RoomEvent.ParticipantNameChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantNameChanged);
|
this.room?.removeAllListeners(RoomEvent.ParticipantNameChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantNameChanged)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantNameChanged)) {
|
||||||
|
@ -678,7 +679,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantPermissionsChanged) !==
|
this.roomEvents.get(RoomEvent.ParticipantPermissionsChanged) !==
|
||||||
oldValues.get(RoomEvent.ParticipantPermissionsChanged)
|
oldValues.get(RoomEvent.ParticipantPermissionsChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ParticipantPermissionsChanged);
|
this.room?.removeAllListeners(RoomEvent.ParticipantPermissionsChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ParticipantPermissionsChanged)) {
|
if (this.roomEvents.get(RoomEvent.ParticipantPermissionsChanged)) {
|
||||||
|
@ -691,7 +692,8 @@ export class OpenviduInstanceComponent {
|
||||||
this.updateEventList(
|
this.updateEventList(
|
||||||
RoomEvent.ParticipantPermissionsChanged,
|
RoomEvent.ParticipantPermissionsChanged,
|
||||||
{ prevPermissions, participant },
|
{ prevPermissions, participant },
|
||||||
`${participant.identity
|
`${
|
||||||
|
participant.identity
|
||||||
} (previous: ${prevPermissions}, new: ${JSON.stringify(
|
} (previous: ${prevPermissions}, new: ${JSON.stringify(
|
||||||
participant.permissions
|
participant.permissions
|
||||||
)}`
|
)}`
|
||||||
|
@ -704,7 +706,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ActiveSpeakersChanged) !==
|
this.roomEvents.get(RoomEvent.ActiveSpeakersChanged) !==
|
||||||
oldValues.get(RoomEvent.ActiveSpeakersChanged)
|
oldValues.get(RoomEvent.ActiveSpeakersChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ActiveSpeakersChanged);
|
this.room?.removeAllListeners(RoomEvent.ActiveSpeakersChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ActiveSpeakersChanged)) {
|
if (this.roomEvents.get(RoomEvent.ActiveSpeakersChanged)) {
|
||||||
|
@ -728,7 +730,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.RoomMetadataChanged) !==
|
this.roomEvents.get(RoomEvent.RoomMetadataChanged) !==
|
||||||
oldValues.get(RoomEvent.RoomMetadataChanged)
|
oldValues.get(RoomEvent.RoomMetadataChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.RoomMetadataChanged);
|
this.room?.removeAllListeners(RoomEvent.RoomMetadataChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.RoomMetadataChanged)) {
|
if (this.roomEvents.get(RoomEvent.RoomMetadataChanged)) {
|
||||||
|
@ -745,7 +747,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.DataReceived) !==
|
this.roomEvents.get(RoomEvent.DataReceived) !==
|
||||||
oldValues.get(RoomEvent.DataReceived)
|
oldValues.get(RoomEvent.DataReceived)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.DataReceived);
|
this.room?.removeAllListeners(RoomEvent.DataReceived);
|
||||||
if (this.roomEvents.get(RoomEvent.DataReceived)) {
|
if (this.roomEvents.get(RoomEvent.DataReceived)) {
|
||||||
|
@ -771,7 +773,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ConnectionQualityChanged) !==
|
this.roomEvents.get(RoomEvent.ConnectionQualityChanged) !==
|
||||||
oldValues.get(RoomEvent.ConnectionQualityChanged)
|
oldValues.get(RoomEvent.ConnectionQualityChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ConnectionQualityChanged);
|
this.room?.removeAllListeners(RoomEvent.ConnectionQualityChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ConnectionQualityChanged)) {
|
if (this.roomEvents.get(RoomEvent.ConnectionQualityChanged)) {
|
||||||
|
@ -791,7 +793,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.MediaDevicesError) !==
|
this.roomEvents.get(RoomEvent.MediaDevicesError) !==
|
||||||
oldValues.get(RoomEvent.MediaDevicesError)
|
oldValues.get(RoomEvent.MediaDevicesError)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.MediaDevicesError);
|
this.room?.removeAllListeners(RoomEvent.MediaDevicesError);
|
||||||
if (this.roomEvents.get(RoomEvent.MediaDevicesError)) {
|
if (this.roomEvents.get(RoomEvent.MediaDevicesError)) {
|
||||||
|
@ -811,7 +813,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackStreamStateChanged) !==
|
this.roomEvents.get(RoomEvent.TrackStreamStateChanged) !==
|
||||||
oldValues.get(RoomEvent.TrackStreamStateChanged)
|
oldValues.get(RoomEvent.TrackStreamStateChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackStreamStateChanged);
|
this.room?.removeAllListeners(RoomEvent.TrackStreamStateChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackStreamStateChanged)) {
|
if (this.roomEvents.get(RoomEvent.TrackStreamStateChanged)) {
|
||||||
|
@ -835,7 +837,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackSubscriptionPermissionChanged) !==
|
this.roomEvents.get(RoomEvent.TrackSubscriptionPermissionChanged) !==
|
||||||
oldValues.get(RoomEvent.TrackSubscriptionPermissionChanged)
|
oldValues.get(RoomEvent.TrackSubscriptionPermissionChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(
|
this.room?.removeAllListeners(
|
||||||
RoomEvent.TrackSubscriptionPermissionChanged
|
RoomEvent.TrackSubscriptionPermissionChanged
|
||||||
|
@ -861,7 +863,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TrackSubscriptionStatusChanged) !==
|
this.roomEvents.get(RoomEvent.TrackSubscriptionStatusChanged) !==
|
||||||
oldValues.get(RoomEvent.TrackSubscriptionStatusChanged)
|
oldValues.get(RoomEvent.TrackSubscriptionStatusChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.TrackSubscriptionStatusChanged);
|
this.room?.removeAllListeners(RoomEvent.TrackSubscriptionStatusChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.TrackSubscriptionStatusChanged)) {
|
if (this.roomEvents.get(RoomEvent.TrackSubscriptionStatusChanged)) {
|
||||||
|
@ -885,7 +887,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.AudioPlaybackStatusChanged) !==
|
this.roomEvents.get(RoomEvent.AudioPlaybackStatusChanged) !==
|
||||||
oldValues.get(RoomEvent.AudioPlaybackStatusChanged)
|
oldValues.get(RoomEvent.AudioPlaybackStatusChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.AudioPlaybackStatusChanged);
|
this.room?.removeAllListeners(RoomEvent.AudioPlaybackStatusChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.AudioPlaybackStatusChanged)) {
|
if (this.roomEvents.get(RoomEvent.AudioPlaybackStatusChanged)) {
|
||||||
|
@ -905,7 +907,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.SignalConnected) !==
|
this.roomEvents.get(RoomEvent.SignalConnected) !==
|
||||||
oldValues.get(RoomEvent.SignalConnected)
|
oldValues.get(RoomEvent.SignalConnected)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.SignalConnected);
|
this.room?.removeAllListeners(RoomEvent.SignalConnected);
|
||||||
if (this.roomEvents.get(RoomEvent.SignalConnected)) {
|
if (this.roomEvents.get(RoomEvent.SignalConnected)) {
|
||||||
|
@ -918,7 +920,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.RecordingStatusChanged) !==
|
this.roomEvents.get(RoomEvent.RecordingStatusChanged) !==
|
||||||
oldValues.get(RoomEvent.RecordingStatusChanged)
|
oldValues.get(RoomEvent.RecordingStatusChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.RecordingStatusChanged);
|
this.room?.removeAllListeners(RoomEvent.RecordingStatusChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.RecordingStatusChanged)) {
|
if (this.roomEvents.get(RoomEvent.RecordingStatusChanged)) {
|
||||||
|
@ -938,7 +940,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ParticipantEncryptionStatusChanged) !==
|
this.roomEvents.get(RoomEvent.ParticipantEncryptionStatusChanged) !==
|
||||||
oldValues.get(RoomEvent.ParticipantEncryptionStatusChanged)
|
oldValues.get(RoomEvent.ParticipantEncryptionStatusChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(
|
this.room?.removeAllListeners(
|
||||||
RoomEvent.ParticipantEncryptionStatusChanged
|
RoomEvent.ParticipantEncryptionStatusChanged
|
||||||
|
@ -960,7 +962,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.EncryptionError) !==
|
this.roomEvents.get(RoomEvent.EncryptionError) !==
|
||||||
oldValues.get(RoomEvent.EncryptionError)
|
oldValues.get(RoomEvent.EncryptionError)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.EncryptionError);
|
this.room?.removeAllListeners(RoomEvent.EncryptionError);
|
||||||
if (this.roomEvents.get(RoomEvent.EncryptionError)) {
|
if (this.roomEvents.get(RoomEvent.EncryptionError)) {
|
||||||
|
@ -977,7 +979,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.DCBufferStatusChanged) !==
|
this.roomEvents.get(RoomEvent.DCBufferStatusChanged) !==
|
||||||
oldValues.get(RoomEvent.DCBufferStatusChanged)
|
oldValues.get(RoomEvent.DCBufferStatusChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.DCBufferStatusChanged);
|
this.room?.removeAllListeners(RoomEvent.DCBufferStatusChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.DCBufferStatusChanged)) {
|
if (this.roomEvents.get(RoomEvent.DCBufferStatusChanged)) {
|
||||||
|
@ -997,7 +999,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.ActiveDeviceChanged) !==
|
this.roomEvents.get(RoomEvent.ActiveDeviceChanged) !==
|
||||||
oldValues.get(RoomEvent.ActiveDeviceChanged)
|
oldValues.get(RoomEvent.ActiveDeviceChanged)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.ActiveDeviceChanged);
|
this.room?.removeAllListeners(RoomEvent.ActiveDeviceChanged);
|
||||||
if (this.roomEvents.get(RoomEvent.ActiveDeviceChanged)) {
|
if (this.roomEvents.get(RoomEvent.ActiveDeviceChanged)) {
|
||||||
|
@ -1017,7 +1019,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.LocalTrackSubscribed) !==
|
this.roomEvents.get(RoomEvent.LocalTrackSubscribed) !==
|
||||||
oldValues.get(RoomEvent.LocalTrackSubscribed)
|
oldValues.get(RoomEvent.LocalTrackSubscribed)
|
||||||
) {
|
) {
|
||||||
this.room?.removeAllListeners(RoomEvent.LocalTrackSubscribed);
|
this.room?.removeAllListeners(RoomEvent.LocalTrackSubscribed);
|
||||||
if (this.roomEvents.get(RoomEvent.LocalTrackSubscribed)) {
|
if (this.roomEvents.get(RoomEvent.LocalTrackSubscribed)) {
|
||||||
|
@ -1040,7 +1042,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
firstTime ||
|
firstTime ||
|
||||||
this.roomEvents.get(RoomEvent.TranscriptionReceived) !==
|
this.roomEvents.get(RoomEvent.TranscriptionReceived) !==
|
||||||
oldValues.get(RoomEvent.TranscriptionReceived)
|
oldValues.get(RoomEvent.TranscriptionReceived)
|
||||||
) {
|
) {
|
||||||
this.room?.unregisterTextStreamHandler('lk.transcription');
|
this.room?.unregisterTextStreamHandler('lk.transcription');
|
||||||
if (this.roomEvents.get(RoomEvent.TranscriptionReceived)) {
|
if (this.roomEvents.get(RoomEvent.TranscriptionReceived)) {
|
||||||
|
@ -1055,7 +1057,8 @@ export class OpenviduInstanceComponent {
|
||||||
? ('finalTranscription' as any)
|
? ('finalTranscription' as any)
|
||||||
: ('interimTranscription' as any),
|
: ('interimTranscription' as any),
|
||||||
{ participant: participantInfo.identity, message },
|
{ participant: participantInfo.identity, message },
|
||||||
`${participantInfo.identity} ${isFinal ? 'said' : 'is saying'
|
`${participantInfo.identity} ${
|
||||||
|
isFinal ? 'said' : 'is saying'
|
||||||
}: ${message}`,
|
}: ${message}`,
|
||||||
isFinal ? 'RoomEvent' : 'RoomEvent-InterimTranscription'
|
isFinal ? 'RoomEvent' : 'RoomEvent-InterimTranscription'
|
||||||
);
|
);
|
||||||
|
@ -1174,7 +1177,7 @@ export class OpenviduInstanceComponent {
|
||||||
if (
|
if (
|
||||||
!!this.room &&
|
!!this.room &&
|
||||||
JSON.stringify(Array.from(this.roomEvents.entries())) !==
|
JSON.stringify(Array.from(this.roomEvents.entries())) !==
|
||||||
JSON.stringify(Array.from(oldValues.entries()))
|
JSON.stringify(Array.from(oldValues.entries()))
|
||||||
) {
|
) {
|
||||||
this.setupRoomEventListeners(oldValues, false);
|
this.setupRoomEventListeners(oldValues, false);
|
||||||
}
|
}
|
||||||
|
@ -1229,6 +1232,7 @@ export class OpenviduInstanceComponent {
|
||||||
data: {
|
data: {
|
||||||
title: 'PCTransports info',
|
title: 'PCTransports info',
|
||||||
updateFunction,
|
updateFunction,
|
||||||
|
updateInterval: 0,
|
||||||
},
|
},
|
||||||
minWidth: '50vh',
|
minWidth: '50vh',
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,10 +11,10 @@ import { TestFeedService } from 'src/app/services/test-feed.service';
|
||||||
import { InfoDialogComponent } from '../dialogs/info-dialog/info-dialog.component';
|
import { InfoDialogComponent } from '../dialogs/info-dialog/info-dialog.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-video-track',
|
selector: 'app-video-track',
|
||||||
templateUrl: './video-track.component.html',
|
templateUrl: './video-track.component.html',
|
||||||
styleUrls: ['./video-track.component.css'],
|
styleUrls: ['./video-track.component.css'],
|
||||||
standalone: false
|
standalone: false,
|
||||||
})
|
})
|
||||||
export class VideoTrackComponent extends TrackComponent {
|
export class VideoTrackComponent extends TrackComponent {
|
||||||
muteVideoIcon: string = 'videocam';
|
muteVideoIcon: string = 'videocam';
|
||||||
|
@ -96,6 +96,7 @@ export class VideoTrackComponent extends TrackComponent {
|
||||||
title: 'Video Track Layers Info',
|
title: 'Video Track Layers Info',
|
||||||
subtitle: this.finalElementRefId,
|
subtitle: this.finalElementRefId,
|
||||||
updateFunction,
|
updateFunction,
|
||||||
|
updateInterval: 700,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue