mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: make update interval for dialog optional
parent
61fbf9850b
commit
ce47224400
|
@ -7,12 +7,13 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|||
selector: 'app-info-dialog',
|
||||
templateUrl: './info-dialog.component.html',
|
||||
styleUrls: ['./info-dialog.component.css'],
|
||||
standalone: false
|
||||
standalone: false,
|
||||
})
|
||||
export class InfoDialogComponent implements OnDestroy {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
updateFunction: () => Promise<string>;
|
||||
updateInterval: number;
|
||||
|
||||
textAreaValue: string;
|
||||
|
||||
|
@ -26,17 +27,22 @@ export class InfoDialogComponent implements OnDestroy {
|
|||
title: string;
|
||||
subtitle: string;
|
||||
updateFunction: () => Promise<string>;
|
||||
updateInterval: number;
|
||||
},
|
||||
private _ngZone: NgZone
|
||||
) {
|
||||
this.title = data.title;
|
||||
this.subtitle = data.subtitle;
|
||||
this.updateFunction = data.updateFunction;
|
||||
this.updateInterval = data.updateInterval;
|
||||
|
||||
this.updateValue();
|
||||
|
||||
if (this.updateInterval) {
|
||||
this.interval = setInterval(() => {
|
||||
this.updateValue();
|
||||
}, 700);
|
||||
}, this.updateInterval);
|
||||
}
|
||||
|
||||
// this.publisher
|
||||
// .getSenders()
|
||||
|
|
|
@ -451,7 +451,8 @@ export class OpenviduInstanceComponent {
|
|||
this.updateEventList(
|
||||
RoomEvent.TrackSubscriptionFailed,
|
||||
{ trackSid, participant },
|
||||
`${participant.identity} (${trackSid}). Reason: ${reason ? SubscriptionError[reason] : reason
|
||||
`${participant.identity} (${trackSid}). Reason: ${
|
||||
reason ? SubscriptionError[reason] : reason
|
||||
}`
|
||||
);
|
||||
}
|
||||
|
@ -691,7 +692,8 @@ export class OpenviduInstanceComponent {
|
|||
this.updateEventList(
|
||||
RoomEvent.ParticipantPermissionsChanged,
|
||||
{ prevPermissions, participant },
|
||||
`${participant.identity
|
||||
`${
|
||||
participant.identity
|
||||
} (previous: ${prevPermissions}, new: ${JSON.stringify(
|
||||
participant.permissions
|
||||
)}`
|
||||
|
@ -1055,7 +1057,8 @@ export class OpenviduInstanceComponent {
|
|||
? ('finalTranscription' as any)
|
||||
: ('interimTranscription' as any),
|
||||
{ participant: participantInfo.identity, message },
|
||||
`${participantInfo.identity} ${isFinal ? 'said' : 'is saying'
|
||||
`${participantInfo.identity} ${
|
||||
isFinal ? 'said' : 'is saying'
|
||||
}: ${message}`,
|
||||
isFinal ? 'RoomEvent' : 'RoomEvent-InterimTranscription'
|
||||
);
|
||||
|
@ -1229,6 +1232,7 @@ export class OpenviduInstanceComponent {
|
|||
data: {
|
||||
title: 'PCTransports info',
|
||||
updateFunction,
|
||||
updateInterval: 0,
|
||||
},
|
||||
minWidth: '50vh',
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ import { InfoDialogComponent } from '../dialogs/info-dialog/info-dialog.componen
|
|||
selector: 'app-video-track',
|
||||
templateUrl: './video-track.component.html',
|
||||
styleUrls: ['./video-track.component.css'],
|
||||
standalone: false
|
||||
standalone: false,
|
||||
})
|
||||
export class VideoTrackComponent extends TrackComponent {
|
||||
muteVideoIcon: string = 'videocam';
|
||||
|
@ -96,6 +96,7 @@ export class VideoTrackComponent extends TrackComponent {
|
|||
title: 'Video Track Layers Info',
|
||||
subtitle: this.finalElementRefId,
|
||||
updateFunction,
|
||||
updateInterval: 700,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue