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',
|
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();
|
||||||
|
|
||||||
|
if (this.updateInterval) {
|
||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
this.updateValue();
|
this.updateValue();
|
||||||
}, 700);
|
}, this.updateInterval);
|
||||||
|
}
|
||||||
|
|
||||||
// this.publisher
|
// this.publisher
|
||||||
// .getSenders()
|
// .getSenders()
|
||||||
|
|
|
@ -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
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
)}`
|
)}`
|
||||||
|
@ -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'
|
||||||
);
|
);
|
||||||
|
@ -1229,6 +1232,7 @@ export class OpenviduInstanceComponent {
|
||||||
data: {
|
data: {
|
||||||
title: 'PCTransports info',
|
title: 'PCTransports info',
|
||||||
updateFunction,
|
updateFunction,
|
||||||
|
updateInterval: 0,
|
||||||
},
|
},
|
||||||
minWidth: '50vh',
|
minWidth: '50vh',
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { InfoDialogComponent } from '../dialogs/info-dialog/info-dialog.componen
|
||||||
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