diff --git a/frontend/projects/shared-meet-components/src/lib/models/custom-participant.model.ts b/frontend/projects/shared-meet-components/src/lib/models/custom-participant.model.ts
index 4d7e49f..4ca5f32 100644
--- a/frontend/projects/shared-meet-components/src/lib/models/custom-participant.model.ts
+++ b/frontend/projects/shared-meet-components/src/lib/models/custom-participant.model.ts
@@ -3,22 +3,37 @@ import { ParticipantModel, ParticipantProperties } from 'openvidu-components-ang
// Represents a participant in the application.
export class CustomParticipantModel extends ParticipantModel {
- // Indicates the role of the participant.
+ // Indicates the original role of the participant.
+ private _meetOriginalRole: ParticipantRole;
+ // Indicates the current role of the participant.
private _meetRole: ParticipantRole;
constructor(props: ParticipantProperties) {
super(props);
const participant = props.participant;
- this._meetRole = extractParticipantRole(participant.metadata);
+ this._meetOriginalRole = extractParticipantRole(participant.metadata);
+ this._meetRole = this._meetOriginalRole;
}
set meetRole(role: ParticipantRole) {
this._meetRole = role;
}
+ /**
+ * Checks if the current role of the participant is moderator.
+ * @returns True if the current role is moderator, false otherwise.
+ */
isModerator(): boolean {
return this._meetRole === ParticipantRole.MODERATOR;
}
+
+ /**
+ * Checks if the original role of the participant is moderator.
+ * @returns True if the original role is moderator, false otherwise.
+ */
+ isOriginalModerator(): boolean {
+ return this._meetOriginalRole === ParticipantRole.MODERATOR;
+ }
}
const extractParticipantRole = (metadata: any): ParticipantRole => {
diff --git a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.html b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.html
index b34395a..d893f01 100644
--- a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.html
+++ b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.html
@@ -1,7 +1,6 @@
@if (showMeeting) {
- @if (features().canModerateRoom) {
-