frontend: add copy links functionality for moderator and publisher in video room
This commit is contained in:
parent
5a6d17d61a
commit
b968a9cdd5
@ -135,6 +135,29 @@
|
||||
>
|
||||
@if (features().canModerateRoom) {
|
||||
<div *ovToolbarAdditionalButtons>
|
||||
<!-- Copy Links Button -->
|
||||
<button
|
||||
id="copy-links-btn"
|
||||
mat-icon-button
|
||||
[matMenuTriggerFor]="linksMenu"
|
||||
matTooltip="Copy meeting links"
|
||||
[disableRipple]="true"
|
||||
class="copy-links-btn"
|
||||
>
|
||||
<mat-icon>link</mat-icon>
|
||||
</button>
|
||||
<mat-menu #linksMenu="matMenu">
|
||||
<button mat-menu-item (click)="copyModeratorLink()" id="copy-moderator-link">
|
||||
<mat-icon>content_copy</mat-icon>
|
||||
<span>Copy Moderator Link</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="copyPublisherLink()" id="copy-publisher-link">
|
||||
<mat-icon>content_copy</mat-icon>
|
||||
<span>Copy Publisher Link</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
||||
<!-- Leave Button -->
|
||||
<button
|
||||
id="leave-btn"
|
||||
mat-icon-button
|
||||
@ -160,7 +183,7 @@
|
||||
|
||||
<!-- Participant Panel Item Elements -->
|
||||
<div *ovParticipantPanelItemElements="let participant">
|
||||
<!-- Leave Button for Local Participant -->
|
||||
<!-- Kick participant -->
|
||||
@if (!participant.isLocal) {
|
||||
<button
|
||||
mat-icon-button
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { Clipboard } from '@angular/cdk/clipboard';
|
||||
import { Component, OnDestroy, OnInit, Signal } from '@angular/core';
|
||||
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { MatButtonModule, MatIconButton } from '@angular/material/button';
|
||||
@ -81,7 +82,8 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
|
||||
protected participantService: ParticipantTokenService,
|
||||
protected wcManagerService: WebComponentManagerService,
|
||||
protected sessionStorageService: SessionStorageService,
|
||||
protected featureConfService: FeatureConfigurationService
|
||||
protected featureConfService: FeatureConfigurationService,
|
||||
protected clipboard: Clipboard
|
||||
) {
|
||||
this.features = this.featureConfService.features;
|
||||
}
|
||||
@ -150,6 +152,18 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
|
||||
await this.roomService.kickParticipant(this.roomId, participant.identity);
|
||||
}
|
||||
|
||||
// TODO: Improve this method for avoiding rest requests
|
||||
async copyModeratorLink() {
|
||||
const room = await this.roomService.getRoom(this.roomId);
|
||||
this.clipboard.copy(room.moderatorRoomUrl);
|
||||
}
|
||||
|
||||
// TODO: Improve this method for avoiding rest requests
|
||||
async copyPublisherLink() {
|
||||
const room = await this.roomService.getRoom(this.roomId);
|
||||
this.clipboard.copy(room.publisherRoomUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the participant name in the form control.
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user