Constructors
Constructor
new AppTekSDK(proxyUrl?, licenseKey?): AppTekSDK;Parameters
| Parameter | Type | Default value |
|---|---|---|
proxyUrl | string | "https://accessibility.apptek.com/grpc-proxy" |
licenseKey? | string | undefined |
Returns
AppTekSDK
Accessors
isActive
Get Signature
get isActive(): boolean;Returns true if the SDK is currently recording/streaming.
Returns
boolean
isInitialized
Get Signature
get isInitialized(): boolean;Returns true if the SDK has been initialized with a valid license key.
Returns
boolean
status
Get Signature
get status(): string;Returns the current status string.
Returns
string
Methods
activateRoom()
activateRoom(roomId): void;Dynamically activates a room mid-session.
Parameters
| Parameter | Type |
|---|---|
roomId | string |
Returns
void
createRoom()
createRoom(): Promise<RoomResponse>;Creates a new room.
Returns
Promise<RoomResponse>
getLanguages()
getLanguages(): Promise<Recognize2AvailableResponse>;Returns
Promise<Recognize2AvailableResponse>
getNetworkStats()
getNetworkStats(iterations?, intervalMs?): Promise<NetworkStatsResponse>;Measure network statistics (latency, average, jitter) over multiple pings.
Parameters
| Parameter | Type | Description |
|---|---|---|
iterations? | number | Number of pings to send (default: 4) |
intervalMs? | number | Delay between pings in milliseconds (default: 200) |
Returns
Promise<NetworkStatsResponse>
getTranslateLanguages()
getTranslateLanguages(): Promise<TranslateAvailableResponse>;Returns
Promise<TranslateAvailableResponse>
init()
init(licenseKey?): Promise<boolean>;initializes the SDK and validates the license key.
If a key is passed, it overrides the constructor key.
Parameters
| Parameter | Type |
|---|---|
licenseKey? | string |
Returns
Promise<boolean>
listRooms()
listRooms(): Promise<RoomListResponse>;Lists rooms associated with the license key.
Returns
Promise<RoomListResponse>
ping()
ping(): Promise<PingResponse>;Measure network quality and round-trip latency.
Returns
Promise<PingResponse>
startFromStream()
startFromStream(
stream,
config,
callbacks,
options?): Promise<void>;Starts streaming from a provided MediaStream (e.g. from a video element).
Parameters
| Parameter | Type |
|---|---|
stream | MediaStream |
config | Recognize2StreamConfig |
callbacks | AppTekSDKCallbacks |
options? | { roomId?: string; workletUrl?: string; } |
options.roomId? | string |
options.workletUrl? | string |
Returns
Promise<void>
startMicrophone()
startMicrophone(
config,
callbacks,
stream?,
options?): Promise<void>;Starts microphone and streaming.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | Recognize2StreamConfig | - |
callbacks | AppTekSDKCallbacks | - |
stream? | MediaStream | Optional MediaStream to use instead of requesting microphone access. |
options? | { roomId?: string; workletUrl?: string; } | Optional configuration for the microphone (e.g. workletUrl). |
options.roomId? | string | - |
options.workletUrl? | string | - |
Returns
Promise<void>
stopMicrophone()
stopMicrophone(): void;Stop recording.
Stops microphone but keeps socket open to receive final results.
Returns
void
