Refactor webcomponent events to use camelCase and enums to use snake_case naming conventions

This commit is contained in:
juancarmore 2025-09-09 20:01:48 +02:00
parent df6ebaa49a
commit 686af46102
29 changed files with 132 additions and 132 deletions

View File

@ -4,16 +4,16 @@ required: false
description: | description: |
Filter recordings by their status. Filter recordings by their status.
You can provide multiple statuses as a comma-separated list (e.g., `status=ACTIVE,FAILED`). You can provide multiple statuses as a comma-separated list (e.g., `status=active,failed`).
> ⚠️ **Note:** Using this filter may impact performance for large datasets. > ⚠️ **Note:** Using this filter may impact performance for large datasets.
schema: schema:
type: string type: string
enum: enum:
- STARTING - starting
- ACTIVE - active
- ENDING - ending
- COMPLETE - complete
- FAILED - failed
- ABORTED - aborted
- LIMIT_REACHED - limit_reached

View File

@ -7,7 +7,7 @@ content:
recordingId: 'room-123--EG_XYZ--XX445' recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123' roomId: 'room-123'
roomName: 'room' roomName: 'room'
status: 'ACTIVE' status: 'active'
filename: 'room-123--XX445.mp4' filename: 'room-123--XX445.mp4'
startDate: 1600000000000 startDate: 1600000000000
headers: headers:

View File

@ -13,7 +13,7 @@ content:
recordingId: 'room-123--EG_XYZ--XX445' recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123' roomId: 'room-123'
roomName: 'room' roomName: 'room'
status: 'ENDING' status: 'ending'
filename: 'room-123--XX445.mp4' filename: 'room-123--XX445.mp4'
startDate: 1600000000000 startDate: 1600000000000
details: 'End reason: StopEgress API' details: 'End reason: StopEgress API'

View File

@ -10,7 +10,7 @@ content:
recordingId: 'room-123--EG_XYZ--XX445' recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123' roomId: 'room-123'
roomName: 'room' roomName: 'room'
status: 'COMPLETE' status: 'complete'
filename: 'room-123--XX445.mp4' filename: 'room-123--XX445.mp4'
startDate: 1600000000000 startDate: 1600000000000
endDate: 1600000003600 endDate: 1600000003600
@ -24,6 +24,6 @@ content:
recordingId: 'room-456--EG_ABC--QR789' recordingId: 'room-456--EG_ABC--QR789'
roomId: 'room-456' roomId: 'room-456'
roomName: 'room' roomName: 'room'
status: 'ACTIVE' status: 'active'
filename: 'room-456--QR789.mp4' filename: 'room-456--QR789.mp4'
startDate: 1682500000000 startDate: 1682500000000

View File

@ -18,7 +18,7 @@ content:
- recordingId: 'room-123--EG_XYZ--XX445' - recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123' roomId: 'room-123'
roomName: 'room' roomName: 'room'
status: 'ACTIVE' status: 'active'
filename: 'room-123--XX445.mp4' filename: 'room-123--XX445.mp4'
startDate: 1620000000000 startDate: 1620000000000
endDate: 1620000003600 endDate: 1620000003600
@ -28,7 +28,7 @@ content:
- recordingId: 'room-456--EG_ZYX--XX678' - recordingId: 'room-456--EG_ZYX--XX678'
roomId: 'room-456' roomId: 'room-456'
roomName: 'room' roomName: 'room'
status: 'COMPLETE' status: 'complete'
filename: 'room-456--XX678.mp4' filename: 'room-456--XX678.mp4'
startDate: 1625000000000 startDate: 1625000000000
endDate: 1625000007200 endDate: 1625000007200
@ -54,11 +54,11 @@ content:
recordings: recordings:
- recordingId: 'room-123--EG_XYZ--XX445' - recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123' roomId: 'room-123'
status: 'ACTIVE' status: 'active'
size: 1024 size: 1024
- recordingId: 'room-456--EG_ZYX--XX678' - recordingId: 'room-456--EG_ZYX--XX678'
roomId: 'room-456' roomId: 'room-456'
status: 'COMPLETE' status: 'complete'
size: 2048 size: 2048
pagination: pagination:
isTruncated: false isTruncated: false

View File

@ -13,12 +13,12 @@ AuthenticationPreferences:
type: type:
type: string type: string
enum: enum:
- single-user - single_user
default: single-user default: single_user
example: single-user example: single_user
description: | description: |
Specifies the authentication method used to access the application. Specifies the authentication method used to access the application.
- `single-user`: Only one user account exists, which has administrative privileges and is used for all access. - `single_user`: Only one user account exists, which has administrative privileges and is used for all access.
authModeToAccessRoom: authModeToAccessRoom:
type: string type: string
enum: enum:

View File

@ -19,8 +19,8 @@ properties:
# The output mode of the recording. Possible value: "COMPOSED". # The output mode of the recording. Possible value: "COMPOSED".
status: status:
type: string type: string
enum: ['STARTING', 'ACTIVE', 'ENDING', 'COMPLETE', 'FAILED', 'ABORTED', 'LIMIT_REACHED'] enum: ['starting', 'active', 'ending', 'complete', 'failed', 'aborted', 'limit_reached']
example: 'ACTIVE' example: 'active'
description: The status of the recording. description: The status of the recording.
filename: filename:
type: string type: string

View File

@ -30,15 +30,15 @@ MeetRecordingPreferences:
type: string type: string
enum: enum:
- admin - admin
- admin-moderator - admin_moderator
- admin-moderator-speaker - admin_moderator_speaker
default: admin-moderator-speaker default: admin_moderator_speaker
example: admin-moderator-speaker example: admin_moderator_speaker
description: | description: |
Defines who can access the recording. Options are: Defines who can access the recording. Options are:
- `admin`: Only administrators can access the recording. - `admin`: Only administrators can access the recording.
- `admin-moderator`: Administrators and moderators can access the recording. - `admin_moderator`: Administrators and moderators can access the recording.
- `admin-moderator-speaker`: Administrators, moderators and speakers can access the recording. - `admin_moderator_speaker`: Administrators, moderators and speakers can access the recording.
MeetVirtualBackgroundPreferences: MeetVirtualBackgroundPreferences:
type: object type: object
properties: properties:

View File

@ -38,7 +38,7 @@
description: | description: |
Stops a recording with the specified recording ID. Stops a recording with the specified recording ID.
> **Note:** The recording must be in an `ACTIVE` state; otherwise, a 409 error is returned. > **Note:** The recording must be in an `active` state; otherwise, a 409 error is returned.
tags: tags:
- Internal API - Recordings - Internal API - Recordings
security: security:

View File

@ -146,7 +146,7 @@
Deletes a recording with the specified recording ID. Deletes a recording with the specified recording ID.
> ⚠️ **Note:** The recording will only be deleted if it exists and is not in progress > ⚠️ **Note:** The recording will only be deleted if it exists and is not in progress
> (i.e., not in a state such as `ACTIVE`, `STARTING`, or `ENDING`). > (i.e., not in a state such as `active`, `starting`, or `ending`).
tags: tags:
- OpenVidu Meet - Recordings - OpenVidu Meet - Recordings
security: security:

View File

@ -4,7 +4,7 @@ recordingStarted:
description: | description: |
This webhook is triggered when a recording starts. This webhook is triggered when a recording starts.
> The recording can be in the `STARTING` status for a few seconds before it becomes `ACTIVE`. > The recording can be in the `starting` status for a few seconds before it becomes `active`.
operationId: recordingStartedWebhook operationId: recordingStartedWebhook
parameters: parameters:
- $ref: ../components/parameters/x-timestamp.yaml - $ref: ../components/parameters/x-timestamp.yaml
@ -26,8 +26,8 @@ recordingStarted:
- $ref: ../components/schemas/recording-base.yaml - $ref: ../components/schemas/recording-base.yaml
- properties: - properties:
status: status:
enum: [STARTING, ACTIVE] enum: [starting, active]
example: STARTING example: starting
responses: responses:
'200': '200':
$ref: ../components/responses/webhook-success.yaml $ref: ../components/responses/webhook-success.yaml
@ -38,7 +38,7 @@ recordingUpdated:
description: | description: |
This webhook is triggered when a recording update occurs. This webhook is triggered when a recording update occurs.
> This update can be due to a change in the recording status (e.g., from `STARTING` to `ACTIVE`). > This update can be due to a change in the recording status (e.g., from `starting` to `active`).
operationId: recordingUpdatedWebhook operationId: recordingUpdatedWebhook
parameters: parameters:
- $ref: ../components/parameters/x-timestamp.yaml - $ref: ../components/parameters/x-timestamp.yaml
@ -60,8 +60,8 @@ recordingUpdated:
- $ref: ../components/schemas/recording-base.yaml - $ref: ../components/schemas/recording-base.yaml
- properties: - properties:
status: status:
enum: [ACTIVE, ENDING] enum: [active, ending]
example: ACTIVE example: active
responses: responses:
'200': '200':
$ref: ../components/responses/webhook-success.yaml $ref: ../components/responses/webhook-success.yaml
@ -100,8 +100,8 @@ recordingEnded:
- $ref: ../components/schemas/recording-base.yaml - $ref: ../components/schemas/recording-base.yaml
- properties: - properties:
status: status:
enum: [COMPLETE, FAILED, ABORTED, LIMIT_REACHED] enum: [complete, failed, aborted, limit_reached]
example: COMPLETE example: complete
endDate: endDate:
type: number type: number
description: The date when the recording ended (milliseconds since the Unix epoch). description: The date when the recording ended (milliseconds since the Unix epoch).

View File

@ -361,7 +361,7 @@ export const expectValidStartRecordingResponse = (response: any, roomId: string,
expect(response.body).toHaveProperty('roomId', roomId); expect(response.body).toHaveProperty('roomId', roomId);
expect(response.body).toHaveProperty('roomName', roomName); expect(response.body).toHaveProperty('roomName', roomName);
expect(response.body).toHaveProperty('startDate'); expect(response.body).toHaveProperty('startDate');
expect(response.body).toHaveProperty('status', 'ACTIVE'); expect(response.body).toHaveProperty('status', 'active');
expect(response.body).toHaveProperty('filename'); expect(response.body).toHaveProperty('filename');
expect(response.body).not.toHaveProperty('duration'); expect(response.body).not.toHaveProperty('duration');
expect(response.body).not.toHaveProperty('endDate'); expect(response.body).not.toHaveProperty('endDate');

View File

@ -84,7 +84,7 @@ describe('Security Preferences API Tests', () => {
expectValidationError( expectValidationError(
response, response,
'authentication.authMethod.type', 'authentication.authMethod.type',
"Invalid enum value. Expected 'single-user', received 'invalid'" "Invalid enum value. Expected 'single_user', received 'invalid'"
); );
}); });

View File

@ -27,14 +27,14 @@ describe('Room API Tests', () => {
}); });
describe('Generate Recording Token Tests', () => { describe('Generate Recording Token Tests', () => {
it('should generate a recording token with canRetrieve and canDelete permissions when using the moderator secret and recording access is admin-moderator', async () => { it('should generate a recording token with canRetrieve and canDelete permissions when using the moderator secret and recording access is admin_moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret); const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret);
expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true); expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true);
}); });
it('should generate a recording token with canRetrieve and canDelete permissions when using the moderator secret and recording access is admin-moderator-speaker', async () => { it('should generate a recording token with canRetrieve and canDelete permissions when using the moderator secret and recording access is admin_moderator_speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -44,14 +44,14 @@ describe('Room API Tests', () => {
expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true); expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true);
}); });
it('should generate a recording token without any permissions when using the speaker secret and recording access is admin-moderator', async () => { it('should generate a recording token without any permissions when using the speaker secret and recording access is admin_moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const response = await generateRecordingToken(roomData.room.roomId, roomData.speakerSecret); const response = await generateRecordingToken(roomData.room.roomId, roomData.speakerSecret);
expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.SPEAKER, false, false); expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.SPEAKER, false, false);
}); });
it('should generate a recording token with canRetrieve permission but not canDelete when using the speaker secret and recording access is admin-moderator-speaker', async () => { it('should generate a recording token with canRetrieve permission but not canDelete when using the speaker secret and recording access is admin_moderator_speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER

View File

@ -169,7 +169,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -183,7 +183,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -197,7 +197,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -208,7 +208,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -233,7 +233,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -249,7 +249,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -265,7 +265,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -278,7 +278,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -362,7 +362,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(404); expect(response.status).toBe(404);
}); });
it('should fail when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should fail when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -378,7 +378,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -394,7 +394,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(404); expect(response.status).toBe(404);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -407,7 +407,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -449,7 +449,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(400); expect(response.status).toBe(400);
}); });
it('should fail when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should fail when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -466,7 +466,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -483,7 +483,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(400); expect(response.status).toBe(400);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -497,7 +497,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -527,7 +527,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -543,7 +543,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -559,7 +559,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -572,7 +572,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -651,7 +651,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -667,7 +667,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -683,7 +683,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -696,7 +696,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -727,7 +727,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is speaker', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -744,7 +744,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should succeed when recording access is admin-moderator-speaker and participant is moderator', async () => { it('should succeed when recording access is admin_moderator_speaker and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom( await updateRecordingAccessPreferencesInRoom(
roomData.room.roomId, roomData.room.roomId,
MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
@ -761,7 +761,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(200); expect(response.status).toBe(200);
}); });
it('should fail when recording access is admin-moderator and participant is speaker', async () => { it('should fail when recording access is admin_moderator and participant is speaker', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,
@ -775,7 +775,7 @@ describe('Recording API Security Tests', () => {
expect(response.status).toBe(403); expect(response.status).toBe(403);
}); });
it('should succeed when recording access is admin-moderator and participant is moderator', async () => { it('should succeed when recording access is admin_moderator and participant is moderator', async () => {
await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR);
const recordingCookie = await generateRecordingTokenCookie( const recordingCookie = await generateRecordingTokenCookie(
roomData.room.roomId, roomData.room.roomId,

View File

@ -125,7 +125,7 @@
<div class="video-unavailable-content"> <div class="video-unavailable-content">
<mat-icon class="status-icon">{{ getStatusIcon() }}</mat-icon> <mat-icon class="status-icon">{{ getStatusIcon() }}</mat-icon>
<h3>{{ getStatusMessage() }}</h3> <h3>{{ getStatusMessage() }}</h3>
@if (['STARTING', 'ACTIVE', 'ENDING'].includes(recording.status)) { @if (['starting', 'active', 'ending'].includes(recording.status)) {
<p>The recording is still being processed. Please check back in a few minutes.</p> <p>The recording is still being processed. Please check back in a few minutes.</p>
<button mat-raised-button color="primary" (click)="retryLoad()"> <button mat-raised-button color="primary" (click)="retryLoad()">
<mat-icon>refresh</mat-icon> <mat-icon>refresh</mat-icon>

View File

@ -141,17 +141,17 @@
.status-icon { .status-icon {
@include ov-icon(sm); @include ov-icon(sm);
&.COMPLETE { &.complete {
color: var(--ov-meet-color-success); color: var(--ov-meet-color-success);
} }
&.STARTING, &.starting,
&.ACTIVE, &.active,
&.ENDING { &.ending {
color: var(--ov-meet-color-warning); color: var(--ov-meet-color-warning);
} }
&.FAILED { &.failed {
color: var(--ov-meet-color-error); color: var(--ov-meet-color-error);
} }
} }

View File

@ -49,48 +49,48 @@ test.describe('Web Component E2E Tests', () => {
}); });
test.describe('Event Handling', () => { test.describe('Event Handling', () => {
test('should successfully join as moderator and receive JOINED event', async ({ page }) => { test('should successfully join as moderator and receive joined event', async ({ page }) => {
await joinRoomAs('moderator', participantName, page); await joinRoomAs('moderator', participantName, page);
await page.waitForSelector('.event-JOINED'); await page.waitForSelector('.event-joined');
const joinElements = await page.locator('.event-JOINED').all(); const joinElements = await page.locator('.event-joined').all();
expect(joinElements.length).toBe(1); expect(joinElements.length).toBe(1);
}); });
test('should successfully join as speaker and receive JOINED event', async ({ page }) => { test('should successfully join as speaker and receive joined event', async ({ page }) => {
await joinRoomAs('speaker', participantName, page); await joinRoomAs('speaker', participantName, page);
await page.waitForSelector('.event-JOINED'); await page.waitForSelector('.event-joined');
const joinElements = await page.locator('.event-JOINED').all(); const joinElements = await page.locator('.event-joined').all();
expect(joinElements.length).toBe(1); expect(joinElements.length).toBe(1);
}); });
test('should successfully join to room and receive LEFT event when using leave command', async ({ page }) => { test('should successfully join to room and receive left event when using leave command', async ({ page }) => {
await joinRoomAs('moderator', participantName, page); await joinRoomAs('moderator', participantName, page);
await page.click('#leave-room-btn'); await page.click('#leave-room-btn');
await page.waitForSelector('.event-LEFT'); await page.waitForSelector('.event-left');
const leftElements = await page.locator('.event-LEFT').all(); const leftElements = await page.locator('.event-left').all();
expect(leftElements.length).toBe(1); expect(leftElements.length).toBe(1);
}); });
test('should successfully join to room and receive LEFT event when using disconnect button', async ({ test('should successfully join to room and receive left event when using disconnect button', async ({
page page
}) => { }) => {
await joinRoomAs('moderator', participantName, page); await joinRoomAs('moderator', participantName, page);
await leaveRoom(page, 'moderator'); await leaveRoom(page, 'moderator');
await page.waitForSelector('.event-LEFT'); await page.waitForSelector('.event-left');
const leftElements = await page.locator('.event-LEFT').all(); const leftElements = await page.locator('.event-left').all();
expect(leftElements.length).toBe(1); expect(leftElements.length).toBe(1);
}); });
test('should successfully join to room and receive LEFT event when using end meeting command', async ({ test('should successfully join to room and receive left event when using end meeting command', async ({
page page
}) => { }) => {
await joinRoomAs('moderator', participantName, page); await joinRoomAs('moderator', participantName, page);
await page.click('#end-meeting-btn'); await page.click('#end-meeting-btn');
await page.waitForSelector('.event-LEFT'); await page.waitForSelector('.event-left');
const meetingEndedElements = await page.locator('.event-LEFT').all(); const meetingEndedElements = await page.locator('.event-left').all();
expect(meetingEndedElements.length).toBe(1); expect(meetingEndedElements.length).toBe(1);
}); });
}); });

View File

@ -268,7 +268,7 @@ export const leaveRoom = async (page: Page, role: 'moderator' | 'speaker' = 'spe
await option.click(); await option.click();
} }
await page.waitForSelector('.event-LEFT'); await page.waitForSelector('.event-left');
}; };
export const startScreenSharing = async (page: Page) => { export const startScreenSharing = async (page: Page) => {

View File

@ -52,7 +52,7 @@ describe('OpenViduMeet WebComponent Events', () => {
const dispatchEventSpy = jest.spyOn(component, 'dispatchEvent'); const dispatchEventSpy = jest.spyOn(component, 'dispatchEvent');
const event = new MessageEvent('message', { const event = new MessageEvent('message', {
origin: 'https://not-allowed.com', origin: 'https://not-allowed.com',
data: { event: 'READY', payload: {} } data: { event: 'ready', payload: {} }
}); });
(eventsManager as any).handleMessage(event); (eventsManager as any).handleMessage(event);
@ -64,13 +64,13 @@ describe('OpenViduMeet WebComponent Events', () => {
const dispatchEventSpy = jest.spyOn(component, 'dispatchEvent'); const dispatchEventSpy = jest.spyOn(component, 'dispatchEvent');
const event = new MessageEvent('message', { const event = new MessageEvent('message', {
origin: testOrigin, origin: testOrigin,
data: { event: 'READY', payload: { foo: 'bar' } } data: { event: 'ready', payload: { foo: 'bar' } }
}); });
(eventsManager as any).handleMessage(event); (eventsManager as any).handleMessage(event);
expect(dispatchEventSpy).toHaveBeenCalledWith( expect(dispatchEventSpy).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
type: 'READY', type: 'ready',
detail: { foo: 'bar' } detail: { foo: 'bar' }
}) })
); );

View File

@ -22,14 +22,14 @@ describe('OpenViduMeet Event Handling', () => {
document.body.innerHTML = ''; document.body.innerHTML = '';
}); });
it('should call sendMessage when READY event is received', () => { it('should call sendMessage when ready event is received', () => {
const sendMessageSpy = jest.spyOn(commandsManager, 'sendMessage' as keyof CommandsManager); const sendMessageSpy = jest.spyOn(commandsManager, 'sendMessage' as keyof CommandsManager);
(component as any).eventsManager.setTargetOrigin(testOrigin); (component as any).eventsManager.setTargetOrigin(testOrigin);
// Mock a message event // Mock a message event
const readyEvent = new MessageEvent('message', { const readyEvent = new MessageEvent('message', {
data: { event: 'READY' }, data: { event: 'ready' },
origin: testOrigin origin: testOrigin
}); });
window.dispatchEvent(readyEvent); window.dispatchEvent(readyEvent);

View File

@ -194,17 +194,17 @@ const listenWebComponentEvents = () => {
return; return;
} }
meet.on('JOINED', (event: CustomEvent<any>) => { meet.on('joined', (event: CustomEvent<any>) => {
console.log('JOINED event received:', event); console.log('"joined" event received:', event);
addEventToLog('JOINED', JSON.stringify(event)); addEventToLog('joined', JSON.stringify(event));
}); });
meet.on('LEFT', (event: CustomEvent<any>) => { meet.on('left', (event: CustomEvent<any>) => {
console.log('LEFT event received:', event); console.log('"left" event received:', event);
addEventToLog('LEFT', JSON.stringify(event)); addEventToLog('left', JSON.stringify(event));
}); });
meet.on('CLOSED', (event: CustomEvent<any>) => { meet.on('closed', (event: CustomEvent<any>) => {
console.log('CLOSED event received:', event); console.log('"closed" event received:', event);
addEventToLog('CLOSED', JSON.stringify(event)); addEventToLog('closed', JSON.stringify(event));
// Redirect to home page // Redirect to home page
// window.location.href = '/'; // window.location.href = '/';

View File

@ -268,10 +268,10 @@
data-testid="recording-access-select" data-testid="recording-access-select"
> >
<option value="admin">Admin Only</option> <option value="admin">Admin Only</option>
<option value="admin-moderator"> <option value="admin_moderator">
Admin & Moderator Admin & Moderator
</option> </option>
<option value="admin-moderator-speaker" selected> <option value="admin_moderator_speaker" selected>
Admin, Moderator & Speaker Admin, Moderator & Speaker
</option> </option>
</select> </select>

View File

@ -165,7 +165,7 @@ const processFormPreferences = (body: any): any => {
enabled: body['preferences.recordingPreferences.enabled'] === 'on', enabled: body['preferences.recordingPreferences.enabled'] === 'on',
// Only include allowAccessTo if recording is enabled // Only include allowAccessTo if recording is enabled
...(body['preferences.recordingPreferences.enabled'] === 'on' && { ...(body['preferences.recordingPreferences.enabled'] === 'on' && {
allowAccessTo: body['preferences.recordingPreferences.allowAccessTo'] || 'admin-moderator-speaker' allowAccessTo: body['preferences.recordingPreferences.allowAccessTo'] || 'admin_moderator_speaker'
}) })
}, },
virtualBackgroundPreferences: { virtualBackgroundPreferences: {

View File

@ -23,9 +23,9 @@ export interface AuthMethod {
* Enum for authentication types. * Enum for authentication types.
*/ */
export const enum AuthType { export const enum AuthType {
SINGLE_USER = 'single-user', SINGLE_USER = 'single_user',
// MULTI_USER = 'multi-user', // MULTI_USER = 'multi_user',
// OAUTH_ONLY = 'oauth-only' // OAUTH_ONLY = 'oauth_only'
} }
/** /**

View File

@ -1,15 +1,15 @@
export const enum MeetRecordingStatus { export const enum MeetRecordingStatus {
STARTING = 'STARTING', STARTING = 'starting',
ACTIVE = 'ACTIVE', ACTIVE = 'active',
ENDING = 'ENDING', ENDING = 'ending',
COMPLETE = 'COMPLETE', COMPLETE = 'complete',
FAILED = 'FAILED', FAILED = 'failed',
ABORTED = 'ABORTED', ABORTED = 'aborted',
LIMIT_REACHED = 'LIMIT_REACHED' LIMIT_REACHED = 'limit_reached'
} }
// export const enum MeetRecordingOutputMode { // export const enum MeetRecordingOutputMode {
// COMPOSED = 'COMPOSED', // COMPOSED = 'composed',
// } // }
/** /**

View File

@ -17,8 +17,8 @@ export interface MeetRecordingPreferences {
export const enum MeetRecordingAccess { export const enum MeetRecordingAccess {
ADMIN = 'admin', // Only admins can access the recording ADMIN = 'admin', // Only admins can access the recording
ADMIN_MODERATOR = 'admin-moderator', // Admins and moderators can access ADMIN_MODERATOR = 'admin_moderator', // Admins and moderators can access
ADMIN_MODERATOR_SPEAKER = 'admin-moderator-speaker' // Admins, moderators and speakers can access ADMIN_MODERATOR_SPEAKER = 'admin_moderator_speaker' // Admins, moderators and speakers can access
} }
export interface MeetChatPreferences { export interface MeetChatPreferences {

View File

@ -7,21 +7,21 @@ export enum WebComponentCommand {
* This command is sent from the webcomponent to the iframe for intialice the domain. * This command is sent from the webcomponent to the iframe for intialice the domain.
* @private * @private
*/ */
INITIALIZE = 'INITIALIZE', INITIALIZE = 'initialize',
/** /**
* Ends the current meeting for all participants. * Ends the current meeting for all participants.
* @moderator * @moderator
*/ */
END_MEETING = 'END_MEETING', END_MEETING = 'endMeeting',
/** /**
* Disconnects the local participant from the current room. * Disconnects the local participant from the current room.
*/ */
LEAVE_ROOM = 'LEAVE_ROOM', LEAVE_ROOM = 'leaveRoom',
/** /**
* Kicks a participant from the meeting. * Kicks a participant from the meeting.
* @moderator * @moderator
*/ */
KICK_PARTICIPANT = 'KICK_PARTICIPANT' KICK_PARTICIPANT = 'kickParticipant'
} }
/** /**

View File

@ -7,19 +7,19 @@ export enum WebComponentEvent {
* Event emitted when application is ready to receive commands. * Event emitted when application is ready to receive commands.
* @private * @private
*/ */
READY = 'READY', READY = 'ready',
/** /**
* Event emitted when the local participant joins the room. * Event emitted when the local participant joins the room.
*/ */
JOINED = 'JOINED', JOINED = 'joined',
/** /**
* Event emitted when the local participant leaves the room. * Event emitted when the local participant leaves the room.
*/ */
LEFT = 'LEFT', LEFT = 'left',
/** /**
* Event emitted when the application is closed. * Event emitted when the application is closed.
*/ */
CLOSED = 'CLOSED' CLOSED = 'closed'
} }
/** /**