frontend: add force disconnect functionality for participants in video room
This commit is contained in:
parent
9cdba7259f
commit
a700fff911
@ -146,7 +146,6 @@
|
|||||||
<mat-menu #leaveMenu="matMenu">
|
<mat-menu #leaveMenu="matMenu">
|
||||||
<button mat-menu-item (click)="leaveMeeting()" id="leave-option">
|
<button mat-menu-item (click)="leaveMeeting()" id="leave-option">
|
||||||
<mat-icon>logout</mat-icon>
|
<mat-icon>logout</mat-icon>
|
||||||
|
|
||||||
<span>Leave meeting</span>
|
<span>Leave meeting</span>
|
||||||
</button>
|
</button>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
@ -156,6 +155,21 @@
|
|||||||
</button>
|
</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Participant Panel Item Elements -->
|
||||||
|
<div *ovParticipantPanelItemElements="let participant">
|
||||||
|
<!-- Leave Button for Local Participant -->
|
||||||
|
@if (!participant.isLocal) {
|
||||||
|
<button
|
||||||
|
mat-icon-button
|
||||||
|
(click)="forceDisconnectParticipant(participant)"
|
||||||
|
matTooltip="Disconnect participant"
|
||||||
|
class="force-disconnect-btn"
|
||||||
|
>
|
||||||
|
<mat-icon>call_end</mat-icon>
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</ov-videoconference>
|
</ov-videoconference>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -263,3 +263,8 @@
|
|||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom force disconnect button
|
||||||
|
.force-disconnect-btn {
|
||||||
|
color: var(--ov-meet-color-error)
|
||||||
|
}
|
||||||
|
|||||||
@ -146,6 +146,10 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async forceDisconnectParticipant(participant: ParticipantModel) {
|
||||||
|
await this.roomService.kickParticipant(this.roomId, participant.identity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the participant name in the form control.
|
* Initializes the participant name in the form control.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -243,4 +243,10 @@ export class RoomService {
|
|||||||
const path = `${this.MEETINGS_API}/${roomId}`;
|
const path = `${this.MEETINGS_API}/${roomId}`;
|
||||||
return this.httpService.deleteRequest(path);
|
return this.httpService.deleteRequest(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async kickParticipant(roomId: string, participantId: string): Promise<void> {
|
||||||
|
const path = `${this.MEETINGS_API}/${roomId}/participants/${participantId}`;
|
||||||
|
await this.httpService.deleteRequest(path);
|
||||||
|
this.log.d(`Participant ${participantId} kicked from room ${roomId}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user