Skip to content

Commit

Permalink
frontend: Displayed error in video room component
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Oct 28, 2024
1 parent a1d8788 commit 5c20a26
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<ov-videoconference
[token]="token"
[tokenError]="serverError"
[prejoin]="featureFlags.showPrejoin"
[toolbarChatPanelButton]="featureFlags.showChat"
[toolbarRecordingButton]="featureFlags.showRecording"
[toolbarBroadcastingButton]="featureFlags.showBroadcasting"
[activitiesPanelRecordingActivity]="featureFlags.showRecording"
[activitiesPanelBroadcastingActivity]="featureFlags.showBroadcasting"
[toolbarBackgroundEffectsButton]="featureFlags.showBackgrounds"
[toolbarActivitiesPanelButton]="featureFlags.showActivityPanel"
(onTokenRequested)="onTokenRequested($event)"
(onRoomDisconnected)="onRoomDisconnected()"
(onRecordingStartRequested)="onRecordingStartRequested($event)"
(onRecordingStopRequested)="onRecordingStopRequested($event)"
(onRecordingDeleteRequested)="onRecordingDeleteRequested($event)"
(onBroadcastingStartRequested)="onBroadcastingStartRequested($event)"
(onBroadcastingStopRequested)="onBroadcastingStopRequested($event)"
>
</ov-videoconference>
@if (!serverError) {
<ov-videoconference
[token]="token"
[tokenError]="serverError"
[prejoin]="featureFlags.showPrejoin"
[toolbarChatPanelButton]="featureFlags.showChat"
[toolbarRecordingButton]="featureFlags.showRecording"
[toolbarBroadcastingButton]="featureFlags.showBroadcasting"
[activitiesPanelRecordingActivity]="featureFlags.showRecording"
[activitiesPanelBroadcastingActivity]="featureFlags.showBroadcasting"
[toolbarBackgroundEffectsButton]="featureFlags.showBackgrounds"
[toolbarActivitiesPanelButton]="featureFlags.showActivityPanel"
(onTokenRequested)="onTokenRequested($event)"
(onRoomDisconnected)="onRoomDisconnected()"
(onRecordingStartRequested)="onRecordingStartRequested($event)"
(onRecordingStopRequested)="onRecordingStopRequested($event)"
(onRecordingDeleteRequested)="onRecordingDeleteRequested($event)"
(onBroadcastingStartRequested)="onBroadcastingStartRequested($event)"
(onBroadcastingStopRequested)="onBroadcastingStopRequested($event)"
>
</ov-videoconference>
}

@if (!loading && serverError) {
<div class="error">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export class VideoRoomComponent implements OnInit {
if (needToConfigureFlagsFromToken) {
this.configureFetureFlagsFromTokenPermissions();
}

this.loading = false;
} catch (error) {
} catch (error: any) {
console.error('Error fetching room preferences', error);
this.serverError = error.error.message || error.message || error.error;
}
this.loading = false;
}

async onTokenRequested(participantName: string) {
Expand Down

0 comments on commit 5c20a26

Please sign in to comment.