diff --git a/backend/src/services/participant.service.ts b/backend/src/services/participant.service.ts index e6eded7..666831b 100644 --- a/backend/src/services/participant.service.ts +++ b/backend/src/services/participant.service.ts @@ -45,8 +45,6 @@ export class ParticipantService { return this.generateModeratorPermissions(roomName); case ParticipantRole.PUBLISHER: return this.generatePublisherPermissions(roomName); - case ParticipantRole.VIEWER: - return this.generateViewerPermissions(roomName); default: throw new Error(`Role ${role} not supported`); } @@ -104,30 +102,4 @@ export class ParticipantService { } }; } - - protected generateViewerPermissions(roomName: string): ParticipantPermissions { - return { - livekit: { - roomJoin: true, - roomList: false, - roomRecord: false, - roomAdmin: false, - room: roomName, - ingressAdmin: false, - canPublish: false, - canSubscribe: true, - canPublishData: false, - canUpdateOwnMetadata: false, - hidden: false, - recorder: false, - agent: false - }, - openvidu: { - canPublishScreen: false, - canRecord: false, - canChat: false, - canChangeVirtualBackground: false - } - }; - } } diff --git a/backend/src/services/room.service.ts b/backend/src/services/room.service.ts index ca3c83e..83953f3 100644 --- a/backend/src/services/room.service.ts +++ b/backend/src/services/room.service.ts @@ -168,10 +168,6 @@ export class RoomService { return ParticipantRole.PUBLISHER; } - if (room.viewerRoomUrl.includes(secret)) { - return ParticipantRole.VIEWER; - } - throw new Error('Invalid secret'); } @@ -228,7 +224,6 @@ export class RoomService { expirationDate, moderatorRoomUrl: `${baseUrl}/${roomName}/?secret=${secureUid(10)}`, publisherRoomUrl: `${baseUrl}/${roomName}?secret=${secureUid(10)}`, - viewerRoomUrl: `${baseUrl}/${roomName}/?secret=${secureUid(10)}`, preferences }; return openviduRoom; diff --git a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts index d082add..ce94524 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts @@ -69,13 +69,6 @@ export class VideoRoomComponent implements OnInit, OnDestroy { // TODO: Extract permissions from token and apply them to the component this.applyParticipantPermissions(); - if (this.ctxService.isViewerParticipant()) { - this.featureFlags.videoEnabled = false; - this.featureFlags.audioEnabled = false; - this.featureFlags.showMicrophone = false; - this.featureFlags.showCamera = false; - this.featureFlags.showScreenShare = false; - } } catch (error: any) { console.error('Error fetching room preferences', error); this.serverError = error.error.message || error.message || error.error; diff --git a/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts b/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts index d46a2df..80fa98b 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts @@ -15,7 +15,7 @@ export class ContextService { roomName: '', participantName: '', token: '', - participantRole: ParticipantRole.VIEWER, + participantRole: ParticipantRole.PUBLISHER, participantPermissions: { canRecord: false, canChat: false, @@ -114,10 +114,6 @@ export class ContextService { return this.context.participantRole === ParticipantRole.MODERATOR; } - isViewerParticipant(): boolean { - return this.context.participantRole === ParticipantRole.VIEWER; - } - setParticipantName(participantName: string): void { this.context.participantName = participantName; } diff --git a/types/src/participant.ts b/types/src/participant.ts index 358d2f7..7e0c6c5 100644 --- a/types/src/participant.ts +++ b/types/src/participant.ts @@ -15,5 +15,5 @@ export interface ParticipantPermissions { export const enum ParticipantRole { MODERATOR = 'moderator', PUBLISHER = 'publisher', - VIEWER = 'viewer', + // VIEWER = 'viewer', } diff --git a/types/src/room.ts b/types/src/room.ts index 90007e3..bec3e51 100644 --- a/types/src/room.ts +++ b/types/src/room.ts @@ -19,5 +19,4 @@ export interface OpenViduMeetRoom extends BaseRoomOptions { creationDate: number; moderatorRoomUrl: string; publisherRoomUrl: string; - viewerRoomUrl: string; }