Class: VoiceManager
Manages ODIN Voice settings, access keys, and analytics for a project.
Constructors
new VoiceManager()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
projectId | string |
Returns
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:24
Methods
activate()
Activate ODIN Voice for this project
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:139
createAccessKey()
Create an access key
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Access key creation payload |
body.description? | string | Description Optional description for the access key |
body.name | string | Description Human-readable name for the new access key |
Returns
Promise<object>
Created access key (includes the one-time access key string)
| Name | Type | Description | Defined in |
|---|---|---|---|
accessKey | string | Description The one-time access key string. Copy this immediately — it cannot be retrieved again. | 4Players/cortex-typescript-sdk/src/types.ts:5189 |
created? | string | Description ISO 8601 creation timestamp | 4Players/cortex-typescript-sdk/src/types.ts:5185 |
description? | string | Description Optional description of the access key | 4Players/cortex-typescript-sdk/src/types.ts:5179 |
id | string | Description Unique identifier for the access key | 4Players/cortex-typescript-sdk/src/types.ts:5175 |
keyId | string | Description Short identifier derived from the public key | 4Players/cortex-typescript-sdk/src/types.ts:5183 |
name | string | Description Human-readable name of the access key | 4Players/cortex-typescript-sdk/src/types.ts:5177 |
pubKey | string | Description The public key (base64-encoded, 44 characters) | 4Players/cortex-typescript-sdk/src/types.ts:5181 |
updated? | string | Description ISO 8601 last-update timestamp | 4Players/cortex-typescript-sdk/src/types.ts:5187 |
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:60
deleteAccessKey()
Delete an access key
Parameters
| Parameter | Type | Description |
|---|---|---|
accessKeyId | string | Access key ID |
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:86
editAccessKey()
Edit an access key
Parameters
| Parameter | Type | Description |
|---|---|---|
accessKeyId | string | Access key ID |
body | object | Updated access key data |
body.description? | string | Description Updated description for the access key |
body.name | string | Description Updated name for the access key |
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:74
getAnalytics()
Get voice peer analytics
Parameters
| Parameter | Type | Description |
|---|---|---|
query | object | Required start timestamp |
query.start | number | Description Unix timestamp (seconds) for the start of the range |
Returns
Promise<object>
Peers over time data
| Name | Type | Description | Defined in |
|---|---|---|---|
average | number[][] | Description Average concurrent users over time. Each entry is [timestamp_ms, count]. | 4Players/cortex-typescript-sdk/src/types.ts:5201 |
peak | number[][] | Description Peak concurrent users over time. Each entry is [timestamp_ms, count]. | 4Players/cortex-typescript-sdk/src/types.ts:5199 |
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:99
getRoomsAnalytics()
Get voice rooms analytics
Parameters
| Parameter | Type | Description |
|---|---|---|
query | object | Required start timestamp |
query.start | number | Description Unix timestamp (seconds) for the start of the range |
Returns
Promise<object>
Rooms over time data
| Name | Type | Description | Defined in |
|---|---|---|---|
average | number[][] | Description Average active rooms over time. Each entry is [timestamp_ms, count]. | 4Players/cortex-typescript-sdk/src/types.ts:5207 |
peak | number[][] | Description Peak active rooms over time. Each entry is [timestamp_ms, count]. | 4Players/cortex-typescript-sdk/src/types.ts:5205 |
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:113
getSettings()
Get voice settings
Returns
Promise<object>
Voice settings
| Name | Type | Description | Defined in |
|---|---|---|---|
accessKeysCount | number | Description Number of access keys created for this project | 4Players/cortex-typescript-sdk/src/types.ts:5145 |
hostingType? | string | Description Hosting type of the project (e.g. "hosted", "on-premise") | 4Players/cortex-typescript-sdk/src/types.ts:5147 |
peerLimit | number | Description Maximum number of concurrent peers. 0 = unlimited. | 4Players/cortex-typescript-sdk/src/types.ts:5143 |
permissions? | object | Description Permission flags for the current user | 4Players/cortex-typescript-sdk/src/types.ts:5149 |
permissions.addAccessKey? | boolean | Description Permission to add an access key | 4Players/cortex-typescript-sdk/src/types.ts:2676 |
permissions.addUser? | boolean | Description Permission to add a user to the project | 4Players/cortex-typescript-sdk/src/types.ts:2682 |
permissions.deleteAccessKey? | boolean | Description Permission to delete an access key | 4Players/cortex-typescript-sdk/src/types.ts:2680 |
permissions.deleteUser? | boolean | Description Permission to delete a user from the project | 4Players/cortex-typescript-sdk/src/types.ts:2686 |
permissions.downloadLicense? | boolean | Description Permission to download the project's license | 4Players/cortex-typescript-sdk/src/types.ts:2692 |
permissions.editAccessKey? | boolean | Description Permission to edit an access key | 4Players/cortex-typescript-sdk/src/types.ts:2678 |
permissions.editUser? | boolean | Description Permission to edit a user's details (e.g. change role) | 4Players/cortex-typescript-sdk/src/types.ts:2684 |
permissions.setPeerLimit? | boolean | Description Permission to set the peer limit for the project | 4Players/cortex-typescript-sdk/src/types.ts:2688 |
permissions.setProjectName? | boolean | Description Permission to change the project's name | 4Players/cortex-typescript-sdk/src/types.ts:2690 |
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:33
listAccessKeys()
List access keys
Returns
Promise<object[]>
Array of access keys
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:46
updatePeerLimit()
Update the peer limit
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Peer limit payload |
body.peerLimit | number | Description Maximum number of concurrent peers. 0 = unlimited. |
Returns
Promise<object>
Updated voice settings
| Name | Type | Description | Defined in |
|---|---|---|---|
accessKeysCount | number | Description Number of access keys created for this project | 4Players/cortex-typescript-sdk/src/types.ts:5145 |
hostingType? | string | Description Hosting type of the project (e.g. "hosted", "on-premise") | 4Players/cortex-typescript-sdk/src/types.ts:5147 |
peerLimit | number | Description Maximum number of concurrent peers. 0 = unlimited. | 4Players/cortex-typescript-sdk/src/types.ts:5143 |
permissions? | object | Description Permission flags for the current user | 4Players/cortex-typescript-sdk/src/types.ts:5149 |
permissions.addAccessKey? | boolean | Description Permission to add an access key | 4Players/cortex-typescript-sdk/src/types.ts:2676 |
permissions.addUser? | boolean | Description Permission to add a user to the project | 4Players/cortex-typescript-sdk/src/types.ts:2682 |
permissions.deleteAccessKey? | boolean | Description Permission to delete an access key | 4Players/cortex-typescript-sdk/src/types.ts:2680 |
permissions.deleteUser? | boolean | Description Permission to delete a user from the project | 4Players/cortex-typescript-sdk/src/types.ts:2686 |
permissions.downloadLicense? | boolean | Description Permission to download the project's license | 4Players/cortex-typescript-sdk/src/types.ts:2692 |
permissions.editAccessKey? | boolean | Description Permission to edit an access key | 4Players/cortex-typescript-sdk/src/types.ts:2678 |
permissions.editUser? | boolean | Description Permission to edit a user's details (e.g. change role) | 4Players/cortex-typescript-sdk/src/types.ts:2684 |
permissions.setPeerLimit? | boolean | Description Permission to set the peer limit for the project | 4Players/cortex-typescript-sdk/src/types.ts:2688 |
permissions.setProjectName? | boolean | Description Permission to change the project's name | 4Players/cortex-typescript-sdk/src/types.ts:2690 |
Defined in
4Players/cortex-typescript-sdk/src/resources/voice.ts:127