diff --git a/api/fishjam-server b/api/fishjam-server index 339220ff..93b3d30c 160000 --- a/api/fishjam-server +++ b/api/fishjam-server @@ -1 +1 @@ -Subproject commit 339220ff517c5be2e1e54fce8d1b415b59a5f67c +Subproject commit 93b3d30cd8dd465d5e6876935772d95b723db06a diff --git a/api/protos b/api/protos index 85ccd2bb..50aacf98 160000 --- a/api/protos +++ b/api/protos @@ -1 +1 @@ -Subproject commit 85ccd2bbb82ed5a5528c2dba836b05e64f62424f +Subproject commit 50aacf9839c7e1f67e983f775f04206050b99cee diff --git a/api/room-manager b/api/room-manager index 669f4aa1..1875d21d 160000 --- a/api/room-manager +++ b/api/room-manager @@ -1 +1 @@ -Subproject commit 669f4aa1b223bca7e257533bd0233751319d8c23 +Subproject commit 1875d21dfab7861ef6fb2709468dad00f1731b84 diff --git a/docs/tutorials/livestreaming.mdx b/docs/tutorials/livestreaming.mdx index eb80db0d..09ccc9d8 100644 --- a/docs/tutorials/livestreaming.mdx +++ b/docs/tutorials/livestreaming.mdx @@ -209,7 +209,7 @@ We can now start sending media, which we can obtain from the user's camera, scre If you want to continue screen sharing when the app goes to the background, you need to: 1. Enable VoIP background mode by setting `enableVoIPBackgroundMode: true` in the plugin configuration or adding the VoIP background mode to your `Info.plist` - 2. Use the [`useCallKitService`](../../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session + 2. Use the [`useCallKitService`](../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session See the [background calls documentation](../how-to/client/background-streaming) for detailed instructions and code examples. diff --git a/packages/js-server-sdk b/packages/js-server-sdk index c5bee41f..7a2c47c5 160000 --- a/packages/js-server-sdk +++ b/packages/js-server-sdk @@ -1 +1 @@ -Subproject commit c5bee41f041afb516dcc4ff13f79bdaa25d5ad97 +Subproject commit 7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c diff --git a/packages/python-server-sdk b/packages/python-server-sdk index 82f98978..38afe6d8 160000 --- a/packages/python-server-sdk +++ b/packages/python-server-sdk @@ -1 +1 @@ -Subproject commit 82f9897861446a232ec1a0f36c80092a50a7095c +Subproject commit 38afe6d834788d9f5cde5ac7c38bd9d51019bd0b diff --git a/packages/web-client-sdk b/packages/web-client-sdk index eb377356..90ab3e9c 160000 --- a/packages/web-client-sdk +++ b/packages/web-client-sdk @@ -1 +1 @@ -Subproject commit eb3773567f198fa7ce57471c752f1d13f4575725 +Subproject commit 90ab3e9c91fcc1e76750599611c08dadb447fd27 diff --git a/static/api/fishjam-server-openapi.yaml b/static/api/fishjam-server-openapi.yaml index c037adc1..fa3aa818 100644 --- a/static/api/fishjam-server-openapi.yaml +++ b/static/api/fishjam-server-openapi.yaml @@ -85,6 +85,44 @@ components: example: webrtc title: PeerType type: string + RecordingSource: + description: The source for the recording + oneOf: + - $ref: "#/components/schemas/CompositionSource" + title: RecordingSource + type: object + PeerConfigWebRTC: + additionalProperties: false + description: Configuration of a webrtc peer + properties: + options: + $ref: "#/components/schemas/PeerOptionsWebRTC" + type: + description: Peer type + enum: + - webrtc + type: string + required: + - type + - options + title: PeerConfigWebRTC + type: object + MoqAccess: + description: Connection details for a MoQ relay client + properties: + connection_url: + description: Relay connection URL with the JWT embedded as a `?jwt=` query parameter. Pass directly to a MoQ client SDK. + example: https://relay.fishjam.io/abc123?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... + type: string + token: + description: JWT authorizing the MoQ relay connection, also embedded in `connection_url` + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb290IjoiZmlzaGphbSIsInB1dCI6WyJteS1zdHJlYW0iXSwiZ2V0IjpbXSwiaWF0IjoxNzEzMzYwMDAwLCJleHAiOjE3MTMzNjM2MDB9.abc123 + type: string + required: + - connection_url + - token + title: MoqAccess + type: object SubscribeMode: default: auto description: Configuration of peer's subscribing policy @@ -114,23 +152,13 @@ components: nullable: false type: boolean webhookUrl: - description: Webhook URL for receiving server notifications + deprecated: true + description: "Deprecated: configure the webhook in the Dashboard instead. Webhook URL for receiving server notifications; overrides the Dashboard-configured webhook URL" nullable: true pattern: ^https?://[^/]+/.*$ type: string title: StreamConfig type: object - MoqToken: - description: Token for authorizing a MoQ relay connection - properties: - token: - description: JWT token for MoQ relay - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb290IjoiZmlzaGphbSIsInB1dCI6WyJteS1zdHJlYW0iXSwiZ2V0IjpbXSwiaWF0IjoxNzEzMzYwMDAwLCJleHAiOjE3MTMzNjM2MDB9.abc123 - type: string - required: - - token - title: MoqToken - type: object Error: description: Error message properties: @@ -208,15 +236,39 @@ components: - data title: StreamsListingResponse type: object - PeerOptions: - additionalProperties: false - description: Peer-specific options - oneOf: - - $ref: "#/components/schemas/PeerOptionsWebRTC" - - $ref: "#/components/schemas/PeerOptionsAgent" - - $ref: "#/components/schemas/PeerOptionsVapi" - title: PeerOptions + CompositionSource: + description: Recording source coming from composition + properties: + compositionURL: + description: URL of the composition to record + maxLength: 255 + nullable: false + pattern: ^https?://[^/]+/.*$ + type: string + outputId: + description: Id of the output being recorded + maxLength: 255 + nullable: false + type: string + scaleRatio: + default: 1 + description: Scale factor for the recording relative to the source output (>0; may upscale or downscale). Defaults to 1. + exclusiveMinimum: true + minimum: 0 + type: number + required: + - compositionURL + - outputId + title: CompositionSource type: object + RecordingStatus: + description: Lifecycle status of a recording + enum: + - active + - available + - failed + title: RecordingStatus + type: string Streamer: description: Describes streamer status properties: @@ -239,6 +291,22 @@ components: - token title: Streamer type: object + PeerConfigAgent: + additionalProperties: false + description: Configuration of an agent peer + properties: + options: + $ref: "#/components/schemas/PeerOptionsAgent" + type: + description: Peer type + enum: + - agent + type: string + required: + - type + - options + title: PeerConfigAgent + type: object VideoCodec: default: h264 description: Enforces video codec for each peer in the room @@ -282,22 +350,6 @@ components: - inputId title: TrackForwardingInfo type: object - MoqTokenConfig: - additionalProperties: false - description: MoQ token configuration - properties: - publishPath: - description: Path under the root the token grants publish access to - example: my-stream - nullable: true - type: string - subscribePath: - description: Path under the root the token grants subscribe access to - example: my-stream - nullable: true - type: string - title: MoqTokenConfig - type: object RoomType: default: conference description: The use-case of the room. If not provided, this defaults to conference. @@ -311,17 +363,34 @@ components: nullable: false title: RoomType type: string - PeerConfig: + MoqAccessConfig: additionalProperties: false - description: Peer configuration + description: MoQ access configuration properties: - options: - $ref: "#/components/schemas/PeerOptions" - type: - $ref: "#/components/schemas/PeerType" - required: - - options - - type + publishPath: + description: Path under the root the token grants publish access to + example: my-stream + nullable: true + type: string + subscribePath: + description: Path under the root the token grants subscribe access to + example: my-stream + nullable: true + type: string + title: MoqAccessConfig + type: object + PeerConfig: + description: Peer configuration + discriminator: + mapping: + agent: "#/components/schemas/PeerConfigAgent" + vapi: "#/components/schemas/PeerConfigVAPI" + webrtc: "#/components/schemas/PeerConfigWebRTC" + propertyName: type + oneOf: + - $ref: "#/components/schemas/PeerConfigWebRTC" + - $ref: "#/components/schemas/PeerConfigAgent" + - $ref: "#/components/schemas/PeerConfigVAPI" title: PeerConfig type: object TrackMetadata: @@ -350,6 +419,22 @@ components: - compositionURL title: TrackForwarding type: object + PeerConfigVAPI: + additionalProperties: false + description: Configuration of a VAPI peer + properties: + options: + $ref: "#/components/schemas/PeerOptionsVapi" + type: + description: Peer type + enum: + - vapi + type: string + required: + - type + - options + title: PeerConfigVAPI + type: object Subscriptions: description: Describes peer's subscriptions in manual mode properties: @@ -368,6 +453,21 @@ components: - tracks title: Subscriptions type: object + RecordingConfig: + additionalProperties: false + description: Recording configuration + properties: + metadata: + additionalProperties: true + description: Free-form, user-supplied metadata used to organize and filter recordings + nullable: true + type: object + source: + $ref: "#/components/schemas/RecordingSource" + required: + - source + title: RecordingConfig + type: object WebsocketURL: description: Websocket URL to which peer has to connect example: www.fishjam.org/socket/peer @@ -429,7 +529,8 @@ components: videoCodec: $ref: "#/components/schemas/VideoCodec" webhookUrl: - description: URL where Fishjam notifications will be sent + deprecated: true + description: "Deprecated: configure the webhook in the Dashboard instead. URL where Fishjam notifications will be sent; overrides the Dashboard-configured webhook URL" example: https://backend.address.com/fishjam-notifications-endpoint nullable: true pattern: ^https?://[^/]+/.*$ @@ -575,6 +676,36 @@ components: - streamers title: Stream type: object + RecordingDetailsResponse: + description: Response containing recording details + properties: + data: + $ref: "#/components/schemas/Recording" + required: + - data + title: RecordingDetailsResponse + type: object + Recording: + description: A recording and its current lifecycle status + properties: + id: + description: Assigned recording id + type: string + metadata: + additionalProperties: true + description: Free-form, user-supplied metadata used to organize and filter recordings + nullable: true + type: object + source: + $ref: "#/components/schemas/RecordingSource" + status: + $ref: "#/components/schemas/RecordingStatus" + required: + - id + - source + - status + title: Recording + type: object StreamerToken: description: Streamer authorization token properties: @@ -615,6 +746,17 @@ components: example: pcm16 title: AudioFormat type: string + RecordingListResponse: + description: Response containing list of recordings + properties: + data: + items: + $ref: "#/components/schemas/Recording" + type: array + required: + - data + title: RecordingListResponse + type: object securitySchemes: management_token: scheme: bearer @@ -638,7 +780,7 @@ info: You can learn more about our SDKs in our [SDK Docs](http://fishjam.swmansion.com/docs/how-to/backend/server-setup) title: Fishjam API - version: 0.27.0 + version: 0.29.0 openapi: 3.0.0 paths: /livestream: @@ -701,6 +843,12 @@ paths: schema: $ref: "#/components/schemas/Error" description: Unauthorized + "402": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Usage quota exceeded for free tier "503": content: application/json: @@ -945,25 +1093,25 @@ paths: summary: Delete a viewer tags: - Viewers - /moq/token: + /moq/access: post: callbacks: {} description: Issue a short-lived JWT for a Media over QUIC client. - operationId: create_moq_token + operationId: create_moq_access parameters: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/MoqTokenConfig" + $ref: "#/components/schemas/MoqAccessConfig" required: false responses: "200": content: application/json: schema: - $ref: "#/components/schemas/MoqToken" - description: MoQ token successfully created + $ref: "#/components/schemas/MoqAccess" + description: MoQ access successfully created "400": content: application/json: @@ -984,9 +1132,156 @@ paths: description: Service temporarily unavailable security: - management_token: [] - summary: Create a MoQ token + summary: Create MoQ access tags: - MoQ + /recordings: + get: + callbacks: {} + description: List recordings for the tenant, optionally filtered by metadata. + operationId: list_recordings + parameters: + - description: Filter by metadata, e.g. `metadata[env]=prod` (nested keys allowed). Returns recordings whose metadata contains all the given pairs. Query values are compared as JSON strings, so non-string metadata values (numbers, booleans) cannot be matched. + explode: true + in: query + name: metadata + required: false + schema: + additionalProperties: true + type: object + style: deepObject + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordingListResponse" + description: Success + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Unauthorized + security: + - management_token: [] + summary: List recordings + tags: + - Recordings + post: + callbacks: {} + description: Create a recording resource. Capturing starts synchronously, so it is returned with status `active`. + operationId: create_recording + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RecordingConfig" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordingDetailsResponse" + description: Recording created successfully + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Invalid request structure + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Unauthorized + "402": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Usage quota exceeded for free tier + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Service temporarily unavailable + security: + - management_token: [] + summary: Create a recording + tags: + - Recordings + /recordings/{recording_id}: + delete: + callbacks: {} + description: Delete a recording by id. + operationId: delete_recording + parameters: + - description: Recording ID + in: path + name: recording_id + required: true + schema: + type: string + responses: + "204": + description: Successfully deleted recording + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Unauthorized + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Service temporarily unavailable + security: + - management_token: [] + summary: Delete a recording + tags: + - Recordings + get: + callbacks: {} + description: Get a recording by id. + operationId: get_recording + parameters: + - description: Recording ID + in: path + name: recording_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordingDetailsResponse" + description: Success + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Recording doesn't exist + security: + - management_token: [] + summary: Get a recording + tags: + - Recordings /room: get: callbacks: {} @@ -1527,6 +1822,12 @@ paths: schema: $ref: "#/components/schemas/Error" description: Room doesn't exist + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Composition is already receiving track forwardings security: - management_token: [] summary: Create a track forwarding @@ -1580,6 +1881,22 @@ paths: summary: Create a viewer token tags: - Viewers + /validate: + get: + callbacks: {} + description: Returns 200 if the provided Fishjam Management Token is valid, 404 otherwise. + operationId: validate_credentials + parameters: [] + responses: + "200": + description: Credentials are valid + "404": + description: Credentials are invalid or missing + security: + - management_token: [] + summary: Validate Fishjam Management Token + tags: + - Credentials security: [] servers: - url: https://fishjam.io/api/v1/connect/{fishjamId} @@ -1625,6 +1942,15 @@ tags: Only the `"all"` selector is currently supported, which forwards every active track in the room. name: Track Forwardings + - description: | + A **recording** is a saved capture of media output. Creating one synchronously starts + capturing, so it is born `active`; follow its `status` as media is finalized + (`active` → `available`, or `failed`). A recording stands on its own, independent of the + room, stream, or composition it came from, so it stays available after that source ends. + + Set free-form `metadata` when you create a recording; you can then use it to filter + recordings when fetching them. + name: Recordings - description: | Issue short-lived JWT tokens that authorize **Media over QUIC** relay clients to publish and/or subscribe under a scoped path. diff --git a/static/api/room-manager-openapi.yaml b/static/api/room-manager-openapi.yaml index 20f25355..a623cc18 100644 --- a/static/api/room-manager-openapi.yaml +++ b/static/api/room-manager-openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Fishjam Room Manager - version: 0.28.0 + version: 0.29.0 license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 @@ -30,6 +30,7 @@ components: - conference - livestream - audio_only + - audio_only_livestream default: conference room: type: object @@ -135,12 +136,22 @@ components: required: - streamerToken - room - moqToken: + livestreamRoomType: + type: string + enum: + - livestream + - audio_only_livestream + default: livestream + description: Determines whether the livestream carries audio and video or audio only + moqAccess: type: object properties: + connection_url: + type: string token: type: string required: + - connection_url - token streamName: type: string @@ -235,6 +246,14 @@ paths: description: Determines if livestream is public or private name: public in: query + - schema: + $ref: "#/components/schemas/livestreamRoomType" + required: false + description: + Determines whether the livestream carries audio and video or audio + only + name: roomType + in: query responses: "200": description: Get livestream streamer token @@ -250,8 +269,8 @@ paths: $ref: "#/components/schemas/errorResponse" /room-manager/moq/{streamName}/publisher: get: - summary: Get publisher token for a MoQ stream - operationId: publisherToken + summary: Get publisher access for a MoQ stream + operationId: publisherAccess security: [] parameters: - schema: @@ -261,21 +280,21 @@ paths: in: path responses: "200": - description: Get MoQ publisher token + description: Get MoQ publisher access content: application/json: schema: - $ref: "#/components/schemas/moqToken" + $ref: "#/components/schemas/moqAccess" default: - description: Failed to get MoQ publisher token + description: Failed to get MoQ publisher access content: text/plain: schema: $ref: "#/components/schemas/errorResponse" /room-manager/moq/{streamName}/subscriber: get: - summary: Get subscriber token for a MoQ stream - operationId: subscriberToken + summary: Get subscriber access for a MoQ stream + operationId: subscriberAccess security: [] parameters: - schema: @@ -285,21 +304,21 @@ paths: in: path responses: "200": - description: Get MoQ subscriber token + description: Get MoQ subscriber access content: application/json: schema: - $ref: "#/components/schemas/moqToken" + $ref: "#/components/schemas/moqAccess" default: - description: Failed to get MoQ subscriber token + description: Failed to get MoQ subscriber access content: text/plain: schema: $ref: "#/components/schemas/errorResponse" /room-manager/moq/{streamName}/full-access: get: - summary: Get full access token for a MoQ stream - operationId: fullAccessToken + summary: Get full access for a MoQ stream + operationId: fullAccess security: [] parameters: - schema: @@ -309,13 +328,13 @@ paths: in: path responses: "200": - description: Get MoQ full access token + description: Get MoQ full access content: application/json: schema: - $ref: "#/components/schemas/moqToken" + $ref: "#/components/schemas/moqAccess" default: - description: Failed to get MoQ full access token + description: Failed to get MoQ full access content: text/plain: schema: diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKit.md b/versioned_docs/version-0.26.0/api/mobile/functions/useCallKit.md deleted file mode 100644 index 242e724f..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKit.md +++ /dev/null @@ -1,9 +0,0 @@ -# Function: useCallKit() - -> **useCallKit**(): `object` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:100](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L100) - -## Returns - -`object` diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitEvent.md b/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitEvent.md deleted file mode 100644 index 5985bcf7..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitEvent.md +++ /dev/null @@ -1,22 +0,0 @@ -# Function: useCallKitEvent() - -> **useCallKitEvent**\<`T`\>(`action`, `callback`): `void` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:109](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L109) - -## Type Parameters - -| Type Parameter | -| ------ | -| `T` *extends* keyof `CallKitAction` | - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `action` | `T` | -| `callback` | (`event`) => `void` | - -## Returns - -`void` diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitService.md b/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitService.md deleted file mode 100644 index f5201c10..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCallKitService.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: useCallKitService() - -> **useCallKitService**(`config`): `void` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:105](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L105) - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `config` | `CallKitConfig` | - -## Returns - -`void` diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCamera.md b/versioned_docs/version-0.26.0/api/mobile/functions/useCamera.md deleted file mode 100644 index 123f2b9c..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCamera.md +++ /dev/null @@ -1,118 +0,0 @@ -# Function: useCamera() - -> **useCamera**(): `object` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L28) - -## Returns - -### ~~activeCamera~~ - -> **activeCamera**: `null` \| [`DeviceItem`](../type-aliases/DeviceItem.md) - -#### Deprecated - -Use `currentCamera` and `isCameraOn` instead -Indicates which camera is now turned on and streaming - -### cameraDeviceError - -> **cameraDeviceError**: `null` \| [`DeviceError`](../type-aliases/DeviceError.md) - -Possible error thrown while setting up the camera - -### cameraDevices - -> **cameraDevices**: [`DeviceItem`](../type-aliases/DeviceItem.md)[] - -List of available camera devices - -### cameraStream - -> **cameraStream**: `null` \| `MediaStream` - -### currentCamera - -> **currentCamera**: `null` \| `MediaDeviceInfo` - -Indicates which camera is now selected - -### currentCameraMiddleware - -> **currentCameraMiddleware**: [`TrackMiddleware`](../type-aliases/TrackMiddleware.md) - -The currently set camera middleware function - -### isCameraOn - -> **isCameraOn**: `boolean` - -Indicates whether the camera is streaming video - -### selectCamera() - -> **selectCamera**: (`deviceId`) => `Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -Selects the camera device - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `deviceId` | `string` | - -#### Returns - -`Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -### setCameraTrackMiddleware() - -> **setCameraTrackMiddleware**: (`middleware`) => `Promise`\<`void`\> - -Sets the camera middleware - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `middleware` | [`TrackMiddleware`](../type-aliases/TrackMiddleware.md) | - -#### Returns - -`Promise`\<`void`\> - -### startCamera() - -> **startCamera**: (`deviceId?`) => `Promise`\<\[`MediaStreamTrack`, `null`\] \| \[`null`, [`DeviceError`](../type-aliases/DeviceError.md)\]\> - -Starts the camera - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `deviceId?` | `null` \| `string` | - -#### Returns - -`Promise`\<\[`MediaStreamTrack`, `null`\] \| \[`null`, [`DeviceError`](../type-aliases/DeviceError.md)\]\> - -### stopCamera() - -> **stopCamera**: () => `void` - -Stops the camera - -#### Returns - -`void` - -### toggleCamera() - -> **toggleCamera**: () => `Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -Toggles current camera on/off - -#### Returns - -`Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useMicrophone.md b/versioned_docs/version-0.26.0/api/mobile/functions/useMicrophone.md deleted file mode 100644 index ad55a22c..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useMicrophone.md +++ /dev/null @@ -1,124 +0,0 @@ -# Function: useMicrophone() - -> **useMicrophone**(): `object` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L36) - -## Returns - -### ~~activeMicrophone~~ - -> **activeMicrophone**: `null` \| [`DeviceItem`](../type-aliases/DeviceItem.md) - -#### Deprecated - -Use `currentMicrophone` and `isMicrophoneOn` instead -Indicates which microphone is now turned on and streaming audio - -### currentMicrophone - -> **currentMicrophone**: `null` \| `MediaDeviceInfo` - -Indicates which microphone is now selected - -### currentMicrophoneMiddleware - -> **currentMicrophoneMiddleware**: [`TrackMiddleware`](../type-aliases/TrackMiddleware.md) - -The currently set microphone middleware function - -### isMicrophoneMuted - -> **isMicrophoneMuted**: `boolean` - -Indicates whether the microphone is muted - -### isMicrophoneOn - -> **isMicrophoneOn**: `boolean` - -Indicates whether the microphone is streaming audio - -### microphoneDeviceError - -> **microphoneDeviceError**: `null` \| [`DeviceError`](../type-aliases/DeviceError.md) - -Possible error thrown while setting up the microphone - -### microphoneDevices - -> **microphoneDevices**: [`DeviceItem`](../type-aliases/DeviceItem.md)[] - -List of available microphone devices - -### microphoneStream - -> **microphoneStream**: `null` \| `MediaStream` - -### selectMicrophone() - -> **selectMicrophone**: (`deviceId`) => `Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -Selects the microphone device - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `deviceId` | `string` | - -#### Returns - -`Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -### setMicrophoneTrackMiddleware() - -> **setMicrophoneTrackMiddleware**: (`middleware`) => `Promise`\<`void`\> - -Sets the microphone middleware - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `middleware` | [`TrackMiddleware`](../type-aliases/TrackMiddleware.md) | - -#### Returns - -`Promise`\<`void`\> - -### startMicrophone() - -> **startMicrophone**: (`deviceId?`) => `Promise`\<\[`MediaStreamTrack`, `null`\] \| \[`null`, [`DeviceError`](../type-aliases/DeviceError.md)\]\> - -Starts the microphone - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `deviceId?` | `null` \| `string` | - -#### Returns - -`Promise`\<\[`MediaStreamTrack`, `null`\] \| \[`null`, [`DeviceError`](../type-aliases/DeviceError.md)\]\> - -### stopMicrophone() - -> **stopMicrophone**: () => `void` - -Stops the microphone - -#### Returns - -`void` - -### toggleMicrophone() - -> **toggleMicrophone**: () => `Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> - -Toggles current microphone on/off - -#### Returns - -`Promise`\<`undefined` \| [`DeviceError`](../type-aliases/DeviceError.md)\> diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useScreenShare.md b/versioned_docs/version-0.26.0/api/mobile/functions/useScreenShare.md deleted file mode 100644 index bad5dda1..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useScreenShare.md +++ /dev/null @@ -1,77 +0,0 @@ -# Function: useScreenShare() - -> **useScreenShare**(): `object` - -Defined in: [packages/mobile-client/src/overrides/hooks.ts:44](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L44) - -## Returns - -### audioTrack - -> **audioTrack**: `null` \| `MediaStreamTrack` - -The separate audio MediaStreamTrack. - -### currentTracksMiddleware - -> **currentTracksMiddleware**: `null` \| [`TracksMiddleware`](../type-aliases/TracksMiddleware.md) - -The middleware currently assigned to process the tracks. -A screenshare may include both audio and video tracks, and this middleware is capable of processing -each track type. - -### setTracksMiddleware() - -> **setTracksMiddleware**: (`middleware`) => `Promise`\<`void`\> - -Sets the middleware responsible for processing the tracks. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `middleware` | `null` \| [`TracksMiddleware`](../type-aliases/TracksMiddleware.md) | The middleware to set, which can be a TracksMiddleware instance or null to remove the middleware. | - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves once the middleware is successfully set. - -### startStreaming() - -> **startStreaming**: (`props?`) => `Promise`\<`void`\> - -Invokes the screen sharing prompt in the user's browser and starts streaming upon approval. - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `props?` | \{ `audioConstraints?`: `boolean` \| `MediaTrackConstraints`; `videoConstraints?`: `boolean` \| `MediaTrackConstraints`; \} | -| `props.audioConstraints?` | `boolean` \| `MediaTrackConstraints` | -| `props.videoConstraints?` | `boolean` \| `MediaTrackConstraints` | - -#### Returns - -`Promise`\<`void`\> - -### stopStreaming() - -> **stopStreaming**: () => `Promise`\<`void`\> - -Stops the stream and cancels browser screen sharing. - -#### Returns - -`Promise`\<`void`\> - -### stream - -> **stream**: `null` \| `MediaStream` - -### videoTrack - -> **videoTrack**: `null` \| `MediaStreamTrack` - -The separate video MediaStreamTrack. diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectStreamerConfig.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectStreamerConfig.md deleted file mode 100644 index ad4d87b4..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectStreamerConfig.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: ConnectStreamerConfig - -> **ConnectStreamerConfig** = `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L21) - -## Properties - -### inputs - -> **inputs**: [`StreamerInputs`](StreamerInputs.md) - -Defined in: [packages/mobile-client/src/overrides/types.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L22) - -*** - -### token - -> **token**: `string` - -Defined in: [packages/mobile-client/src/overrides/types.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L23) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/CustomSource.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/CustomSource.md deleted file mode 100644 index e5117422..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/CustomSource.md +++ /dev/null @@ -1,17 +0,0 @@ -# Type Alias: CustomSource\ - -> **CustomSource**\<`T`\> = `Omit`\<`ReactClientCustomSource`\<`T`\>, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:64](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L64) - -## Type declaration - -### stream? - -> `optional` **stream**: `RNMediaStream` - -## Type Parameters - -| Type Parameter | -| ------ | -| `T` *extends* `string` | diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceItem.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceItem.md deleted file mode 100644 index 4c55e211..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceItem.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: DeviceItem - -> **DeviceItem** = `object` - -Defined in: packages/react-client/dist/types/public.d.ts:43 - -## Properties - -### deviceId - -> **deviceId**: `string` - -Defined in: packages/react-client/dist/types/public.d.ts:44 - -*** - -### label - -> **label**: `string` - -Defined in: packages/react-client/dist/types/public.d.ts:45 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/FishjamProviderProps.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/FishjamProviderProps.md deleted file mode 100644 index 55553c26..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/FishjamProviderProps.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: FishjamProviderProps - -> **FishjamProviderProps** = `Omit`\<`ReactClientFishjamProviderProps`, `"persistLastDevice"` \| `"fishjamClient"`\> - -Defined in: [packages/mobile-client/src/index.ts:117](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/index.ts#L117) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ForegroundServiceConfig.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/ForegroundServiceConfig.md deleted file mode 100644 index 00fa9a3a..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ForegroundServiceConfig.md +++ /dev/null @@ -1,79 +0,0 @@ -# Type Alias: ForegroundServiceConfig - -> **ForegroundServiceConfig** = `object` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:8](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L8) - -Configuration options for foreground service permissions. - -A type representing the configuration for foreground service permissions. - -## Properties - -### channelId? - -> `optional` **channelId**: `string` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L24) - -The id of the channel. Must be unique per package. - -*** - -### channelName? - -> `optional` **channelName**: `string` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L28) - -The user visible name of the channel. - -*** - -### enableCamera? - -> `optional` **enableCamera**: `boolean` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L12) - -Indicates whether the camera is enabled for the foreground service. - -*** - -### enableMicrophone? - -> `optional` **enableMicrophone**: `boolean` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L16) - -Indicates whether the microphone is enabled for the foreground service. - -*** - -### enableScreenSharing? - -> `optional` **enableScreenSharing**: `boolean` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L20) - -Indicates whether screen sharing is enabled for the foreground service. - -*** - -### notificationContent? - -> `optional` **notificationContent**: `string` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L36) - -The text (second row) of the notification, in a standard notification. - -*** - -### notificationTitle? - -> `optional` **notificationTitle**: `string` - -Defined in: [packages/mobile-client/src/useForegroundService.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L32) - -The title (first row) of the notification, in a standard notification. diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesResult.md deleted file mode 100644 index 7fac693f..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: InitializeDevicesResult - -> **InitializeDevicesResult** = `Omit`\<`ReactClientInitializeDevicesResult`, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:66](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L66) - -## Type declaration - -### stream - -> **stream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesSettings.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesSettings.md deleted file mode 100644 index f85d28a2..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesSettings.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: InitializeDevicesSettings - -> **InitializeDevicesSettings** = `object` - -Defined in: packages/react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:9 - -## Properties - -### enableAudio? - -> `optional` **enableAudio**: `boolean` - -Defined in: packages/react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:11 - -*** - -### enableVideo? - -> `optional` **enableVideo**: `boolean` - -Defined in: packages/react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:10 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/MiddlewareResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/MiddlewareResult.md deleted file mode 100644 index 34d3c29a..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/MiddlewareResult.md +++ /dev/null @@ -1,25 +0,0 @@ -# Type Alias: MiddlewareResult - -> **MiddlewareResult** = `object` - -Defined in: packages/react-client/dist/types/public.d.ts:23 - -## Properties - -### onClear()? - -> `optional` **onClear**: () => `void` - -Defined in: packages/react-client/dist/types/public.d.ts:25 - -#### Returns - -`void` - -*** - -### track - -> **track**: `MediaStreamTrack` - -Defined in: packages/react-client/dist/types/public.d.ts:24 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCPIPViewProps.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCPIPViewProps.md deleted file mode 100644 index a49de9e7..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCPIPViewProps.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: RTCPIPViewProps - -> **RTCPIPViewProps** = `Omit`\<`React.ComponentPropsWithRef`\<*typeof* `OriginalRTCPIPView`\>, `"streamURL"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/RTCView.tsx:10](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/RTCView.tsx#L10) - -## Type declaration - -### mediaStream - -> **mediaStream**: `RNMediaStream` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCVideoViewProps.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCVideoViewProps.md deleted file mode 100644 index 6e35e49d..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RTCVideoViewProps.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: RTCVideoViewProps - -> **RTCVideoViewProps** = `Omit`\<`React.ComponentPropsWithRef`\<*typeof* `OriginalRTCView`\>, `"streamURL"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/RTCView.tsx:6](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/RTCView.tsx#L6) - -## Type declaration - -### mediaStream - -> **mediaStream**: `RNMediaStream` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RemoteTrack.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/RemoteTrack.md deleted file mode 100644 index ea866fff..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RemoteTrack.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: RemoteTrack - -> **RemoteTrack** = `Omit`\<`ReactClientRemoteTrack`, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:62](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L62) - -## Type declaration - -### stream - -> **stream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md deleted file mode 100644 index 5209ee64..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md +++ /dev/null @@ -1,29 +0,0 @@ -# Type Alias: SimulcastBandwidthLimits - -> **SimulcastBandwidthLimits** = `object` - -Defined in: packages/react-client/dist/types/public.d.ts:51 - -## Properties - -### 1 - -> **1**: `number` - -Defined in: packages/react-client/dist/types/public.d.ts:52 - -*** - -### 2 - -> **2**: `number` - -Defined in: packages/react-client/dist/types/public.d.ts:53 - -*** - -### 3 - -> **3**: `number` - -Defined in: packages/react-client/dist/types/public.d.ts:54 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamerInputs.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamerInputs.md deleted file mode 100644 index 16b6758b..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamerInputs.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: StreamerInputs - -> **StreamerInputs** = \{ `audio?`: `RNMediaStream` \| `null`; `video`: `RNMediaStream`; \} \| \{ `audio`: `RNMediaStream`; `video?`: `null`; \} - -Defined in: [packages/mobile-client/src/overrides/types.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L17) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Track.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/Track.md deleted file mode 100644 index 7a828b8c..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Track.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: Track - -> **Track** = `Omit`\<`ReactClientTrack`, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:60](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L60) - -## Type declaration - -### stream - -> **stream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackMiddleware.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackMiddleware.md deleted file mode 100644 index e6fec9f2..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackMiddleware.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackMiddleware - -> **TrackMiddleware** = (`track`) => [`MiddlewareResult`](MiddlewareResult.md) \| `Promise`\<[`MiddlewareResult`](MiddlewareResult.md)\> \| `null` - -Defined in: packages/react-client/dist/types/public.d.ts:27 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddlewareResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddlewareResult.md deleted file mode 100644 index fd95b8bb..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddlewareResult.md +++ /dev/null @@ -1,33 +0,0 @@ -# Type Alias: TracksMiddlewareResult - -> **TracksMiddlewareResult** = `object` - -Defined in: packages/react-client/dist/types/public.d.ts:28 - -## Properties - -### audioTrack - -> **audioTrack**: `MediaStreamTrack` \| `null` - -Defined in: packages/react-client/dist/types/public.d.ts:30 - -*** - -### onClear() - -> **onClear**: () => `void` - -Defined in: packages/react-client/dist/types/public.d.ts:31 - -#### Returns - -`void` - -*** - -### videoTrack - -> **videoTrack**: `MediaStreamTrack` - -Defined in: packages/react-client/dist/types/public.d.ts:29 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCameraResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCameraResult.md deleted file mode 100644 index cf0d73cc..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCameraResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: UseCameraResult - -> **UseCameraResult** = `Omit`\<`ReturnType`\<*typeof* `useCameraReactClient`\>, `"cameraStream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:34](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L34) - -## Type declaration - -### cameraStream - -> **cameraStream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesParams.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesParams.md deleted file mode 100644 index 7243935b..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesParams.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: UseInitializeDevicesParams - -> **UseInitializeDevicesParams** = `object` - -Defined in: packages/react-client/dist/hooks/devices/useInitializeDevices.d.ts:1 - -## Properties - -### enableAudio? - -> `optional` **enableAudio**: `boolean` - -Defined in: packages/react-client/dist/hooks/devices/useInitializeDevices.d.ts:3 - -*** - -### enableVideo? - -> `optional` **enableVideo**: `boolean` - -Defined in: packages/react-client/dist/hooks/devices/useInitializeDevices.d.ts:2 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamViewerResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamViewerResult.md deleted file mode 100644 index e566713b..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamViewerResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: UseLivestreamViewerResult - -> **UseLivestreamViewerResult** = `Omit`\<`ReactClientUseLivestreamViewerResult`, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:30](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L30) - -## Type declaration - -### stream - -> **stream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseMicrophoneResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseMicrophoneResult.md deleted file mode 100644 index 030e6ed2..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseMicrophoneResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: UseMicrophoneResult - -> **UseMicrophoneResult** = `Omit`\<`ReturnType`\<*typeof* `useMicrophoneReactClient`\>, `"toggleMicrophoneMute"` \| `"microphoneStream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L38) - -## Type declaration - -### microphoneStream - -> **microphoneStream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseSandboxProps.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseSandboxProps.md deleted file mode 100644 index c31a18d1..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseSandboxProps.md +++ /dev/null @@ -1,17 +0,0 @@ -# Type Alias: UseSandboxProps - -> **UseSandboxProps** = `object` - -Defined in: packages/react-client/dist/hooks/useSandbox.d.ts:1 - -## Properties - -### configOverride? - -> `optional` **configOverride**: `object` - -Defined in: packages/react-client/dist/hooks/useSandbox.d.ts:2 - -| Name | Type | -| ------ | ------ | -| `sandboxApiUrl?` | `string` | diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseScreenShareResult.md b/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseScreenShareResult.md deleted file mode 100644 index 4d061617..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseScreenShareResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: UseScreenShareResult - -> **UseScreenShareResult** = `Omit`\<`ReturnType`\<*typeof* `useScreenShareReactClient`\>, `"stream"`\> & `object` - -Defined in: [packages/mobile-client/src/overrides/types.ts:45](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L45) - -## Type declaration - -### stream - -> **stream**: `RNMediaStream` \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/typedoc-sidebar.cjs b/versioned_docs/version-0.26.0/api/mobile/typedoc-sidebar.cjs deleted file mode 100644 index 262c3655..00000000 --- a/versioned_docs/version-0.26.0/api/mobile/typedoc-sidebar.cjs +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-check -/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ -const typedocSidebar = {items:[{type:"category",label:"Connection",items:[{type:"doc",id:"api/mobile/functions/useConnection",label:"useConnection"},{type:"doc",id:"api/mobile/functions/useDataChannel",label:"useDataChannel"},{type:"doc",id:"api/mobile/type-aliases/Metadata",label:"Metadata"},{type:"doc",id:"api/mobile/variables/useUpdatePeerMetadata",label:"useUpdatePeerMetadata"},{type:"doc",id:"api/mobile/variables/useVAD",label:"useVAD"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/mobile/functions/FishjamProvider",label:"FishjamProvider"},{type:"doc",id:"api/mobile/functions/RTCPIPView",label:"RTCPIPView"},{type:"doc",id:"api/mobile/functions/RTCView",label:"RTCView"},{type:"doc",id:"api/mobile/functions/useCallKit",label:"useCallKit"},{type:"doc",id:"api/mobile/functions/useCallKitEvent",label:"useCallKitEvent"},{type:"doc",id:"api/mobile/functions/useCallKitService",label:"useCallKitService"},{type:"doc",id:"api/mobile/functions/useCamera",label:"useCamera"},{type:"doc",id:"api/mobile/functions/useCameraPermissions",label:"useCameraPermissions"},{type:"doc",id:"api/mobile/functions/useCustomSource",label:"useCustomSource"},{type:"doc",id:"api/mobile/functions/useInitializeDevices",label:"useInitializeDevices"},{type:"doc",id:"api/mobile/functions/useLivestreamStreamer",label:"useLivestreamStreamer"},{type:"doc",id:"api/mobile/functions/useLivestreamViewer",label:"useLivestreamViewer"},{type:"doc",id:"api/mobile/functions/useMicrophone",label:"useMicrophone"},{type:"doc",id:"api/mobile/functions/useMicrophonePermissions",label:"useMicrophonePermissions"},{type:"doc",id:"api/mobile/functions/usePeers",label:"usePeers"},{type:"doc",id:"api/mobile/functions/useScreenShare",label:"useScreenShare"},{type:"doc",id:"api/mobile/enumerations/Variant",label:"Variant"},{type:"doc",id:"api/mobile/interfaces/DataChannelOptions",label:"DataChannelOptions"},{type:"doc",id:"api/mobile/interfaces/JoinRoomConfig",label:"JoinRoomConfig"},{type:"doc",id:"api/mobile/interfaces/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/mobile/type-aliases/AuthErrorReason",label:"AuthErrorReason"},{type:"doc",id:"api/mobile/type-aliases/BandwidthLimits",label:"BandwidthLimits"},{type:"doc",id:"api/mobile/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/mobile/type-aliases/ConnectStreamerConfig",label:"ConnectStreamerConfig"},{type:"doc",id:"api/mobile/type-aliases/ConnectViewerConfig",label:"ConnectViewerConfig"},{type:"doc",id:"api/mobile/type-aliases/CustomSource",label:"CustomSource"},{type:"doc",id:"api/mobile/type-aliases/DataCallback",label:"DataCallback"},{type:"doc",id:"api/mobile/type-aliases/DeviceError",label:"DeviceError"},{type:"doc",id:"api/mobile/type-aliases/DeviceItem",label:"DeviceItem"},{type:"doc",id:"api/mobile/type-aliases/FishjamProviderProps",label:"FishjamProviderProps"},{type:"doc",id:"api/mobile/type-aliases/ForegroundServiceConfig",label:"ForegroundServiceConfig"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesResult",label:"InitializeDevicesResult"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesSettings",label:"InitializeDevicesSettings"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesStatus",label:"InitializeDevicesStatus"},{type:"doc",id:"api/mobile/type-aliases/JoinErrorReason",label:"JoinErrorReason"},{type:"doc",id:"api/mobile/type-aliases/MiddlewareResult",label:"MiddlewareResult"},{type:"doc",id:"api/mobile/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/mobile/type-aliases/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/mobile/type-aliases/PeerWithTracks",label:"PeerWithTracks"},{type:"doc",id:"api/mobile/type-aliases/PermissionStatus",label:"PermissionStatus"},{type:"doc",id:"api/mobile/type-aliases/PersistLastDeviceHandlers",label:"PersistLastDeviceHandlers"},{type:"doc",id:"api/mobile/type-aliases/ReconnectConfig",label:"ReconnectConfig"},{type:"doc",id:"api/mobile/type-aliases/ReconnectionStatus",label:"ReconnectionStatus"},{type:"doc",id:"api/mobile/type-aliases/RemoteTrack",label:"RemoteTrack"},{type:"doc",id:"api/mobile/type-aliases/RoomType",label:"RoomType"},{type:"doc",id:"api/mobile/type-aliases/RTCPIPViewProps",label:"RTCPIPViewProps"},{type:"doc",id:"api/mobile/type-aliases/RTCVideoViewProps",label:"RTCVideoViewProps"},{type:"doc",id:"api/mobile/type-aliases/SimulcastBandwidthLimit",label:"SimulcastBandwidthLimit"},{type:"doc",id:"api/mobile/type-aliases/SimulcastBandwidthLimits",label:"SimulcastBandwidthLimits"},{type:"doc",id:"api/mobile/type-aliases/StreamConfig",label:"StreamConfig"},{type:"doc",id:"api/mobile/type-aliases/StreamerInputs",label:"StreamerInputs"},{type:"doc",id:"api/mobile/type-aliases/Track",label:"Track"},{type:"doc",id:"api/mobile/type-aliases/TrackBandwidthLimit",label:"TrackBandwidthLimit"},{type:"doc",id:"api/mobile/type-aliases/TrackFields",label:"TrackFields"},{type:"doc",id:"api/mobile/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/mobile/type-aliases/TrackMiddleware",label:"TrackMiddleware"},{type:"doc",id:"api/mobile/type-aliases/TracksMiddleware",label:"TracksMiddleware"},{type:"doc",id:"api/mobile/type-aliases/TracksMiddlewareResult",label:"TracksMiddlewareResult"},{type:"doc",id:"api/mobile/type-aliases/UseCameraResult",label:"UseCameraResult"},{type:"doc",id:"api/mobile/type-aliases/UseCustomSourceResult",label:"UseCustomSourceResult"},{type:"doc",id:"api/mobile/type-aliases/UseDataChannelResult",label:"UseDataChannelResult"},{type:"doc",id:"api/mobile/type-aliases/UseInitializeDevicesParams",label:"UseInitializeDevicesParams"},{type:"doc",id:"api/mobile/type-aliases/UseInitializeDevicesReturn",label:"UseInitializeDevicesReturn"},{type:"doc",id:"api/mobile/type-aliases/UseLivestreamStreamerResult",label:"UseLivestreamStreamerResult"},{type:"doc",id:"api/mobile/type-aliases/UseLivestreamViewerResult",label:"UseLivestreamViewerResult"},{type:"doc",id:"api/mobile/type-aliases/UseMicrophoneResult",label:"UseMicrophoneResult"},{type:"doc",id:"api/mobile/type-aliases/UseSandboxProps",label:"UseSandboxProps"},{type:"doc",id:"api/mobile/type-aliases/UseScreenShareResult",label:"UseScreenShareResult"},{type:"doc",id:"api/mobile/variables/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/mobile/variables/useForegroundService",label:"useForegroundService"},{type:"doc",id:"api/mobile/variables/useSandbox",label:"useSandbox"}]}]}; -module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.26.0/api/server/classes/BadRequestException.md b/versioned_docs/version-0.26.0/api/server/classes/BadRequestException.md deleted file mode 100644 index 49c4b8cf..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/BadRequestException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: BadRequestException - -Defined in: [js-server-sdk/src/exceptions/index.ts:21](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L21) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new BadRequestException**(`error`): `BadRequestException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`BadRequestException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/FishjamBaseException.md b/versioned_docs/version-0.26.0/api/server/classes/FishjamBaseException.md deleted file mode 100644 index de1f9ca1..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/FishjamBaseException.md +++ /dev/null @@ -1,64 +0,0 @@ -# Class: FishjamBaseException - -Defined in: [js-server-sdk/src/exceptions/index.ts:9](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L9) - -## Extends - -- `Error` - -## Extended by - -- [`BadRequestException`](BadRequestException.md) -- [`UnauthorizedException`](UnauthorizedException.md) -- [`ForbiddenException`](ForbiddenException.md) -- [`RoomNotFoundException`](RoomNotFoundException.md) -- [`FishjamNotFoundException`](FishjamNotFoundException.md) -- [`PeerNotFoundException`](PeerNotFoundException.md) -- [`ServiceUnavailableException`](ServiceUnavailableException.md) -- [`UnknownException`](UnknownException.md) - -## Constructors - -### Constructor - -> **new FishjamBaseException**(`error`): `FishjamBaseException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`FishjamBaseException` - -#### Overrides - -`Error.constructor` - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) diff --git a/versioned_docs/version-0.26.0/api/server/classes/FishjamNotFoundException.md b/versioned_docs/version-0.26.0/api/server/classes/FishjamNotFoundException.md deleted file mode 100644 index 65f8b4dc..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/FishjamNotFoundException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: FishjamNotFoundException - -Defined in: [js-server-sdk/src/exceptions/index.ts:29](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L29) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new FishjamNotFoundException**(`error`): `FishjamNotFoundException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`FishjamNotFoundException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/ForbiddenException.md b/versioned_docs/version-0.26.0/api/server/classes/ForbiddenException.md deleted file mode 100644 index 7e6ff13c..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/ForbiddenException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: ForbiddenException - -Defined in: [js-server-sdk/src/exceptions/index.ts:25](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L25) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new ForbiddenException**(`error`): `ForbiddenException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`ForbiddenException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/MissingFishjamIdException.md b/versioned_docs/version-0.26.0/api/server/classes/MissingFishjamIdException.md deleted file mode 100644 index 255adf4e..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/MissingFishjamIdException.md +++ /dev/null @@ -1,23 +0,0 @@ -# Class: MissingFishjamIdException - -Defined in: [js-server-sdk/src/exceptions/index.ts:3](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L3) - -## Extends - -- `Error` - -## Constructors - -### Constructor - -> **new MissingFishjamIdException**(): `MissingFishjamIdException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:4](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L4) - -#### Returns - -`MissingFishjamIdException` - -#### Overrides - -`Error.constructor` diff --git a/versioned_docs/version-0.26.0/api/server/classes/PeerNotFoundException.md b/versioned_docs/version-0.26.0/api/server/classes/PeerNotFoundException.md deleted file mode 100644 index 72771d31..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/PeerNotFoundException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: PeerNotFoundException - -Defined in: [js-server-sdk/src/exceptions/index.ts:31](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L31) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new PeerNotFoundException**(`error`): `PeerNotFoundException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`PeerNotFoundException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/RoomNotFoundException.md b/versioned_docs/version-0.26.0/api/server/classes/RoomNotFoundException.md deleted file mode 100644 index b13e1cc3..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/RoomNotFoundException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: RoomNotFoundException - -Defined in: [js-server-sdk/src/exceptions/index.ts:27](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L27) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new RoomNotFoundException**(`error`): `RoomNotFoundException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`RoomNotFoundException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/ServiceUnavailableException.md b/versioned_docs/version-0.26.0/api/server/classes/ServiceUnavailableException.md deleted file mode 100644 index 1d7b6da4..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/ServiceUnavailableException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: ServiceUnavailableException - -Defined in: [js-server-sdk/src/exceptions/index.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L33) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new ServiceUnavailableException**(`error`): `ServiceUnavailableException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`ServiceUnavailableException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/UnauthorizedException.md b/versioned_docs/version-0.26.0/api/server/classes/UnauthorizedException.md deleted file mode 100644 index abb15b79..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/UnauthorizedException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: UnauthorizedException - -Defined in: [js-server-sdk/src/exceptions/index.ts:23](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L23) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new UnauthorizedException**(`error`): `UnauthorizedException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`UnauthorizedException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/UnknownException.md b/versioned_docs/version-0.26.0/api/server/classes/UnknownException.md deleted file mode 100644 index 3f3ce394..00000000 --- a/versioned_docs/version-0.26.0/api/server/classes/UnknownException.md +++ /dev/null @@ -1,65 +0,0 @@ -# Class: UnknownException - -Defined in: [js-server-sdk/src/exceptions/index.ts:35](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L35) - -## Extends - -- [`FishjamBaseException`](FishjamBaseException.md) - -## Constructors - -### Constructor - -> **new UnknownException**(`error`): `UnknownException` - -Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L13) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `AxiosError`\<`Record`\<`string`, `string`\>\> | - -#### Returns - -`UnknownException` - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) - -## Properties - -### axiosCode? - -> `optional` **axiosCode**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:11](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L11) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`axiosCode`](FishjamBaseException.md#axioscode) - -*** - -### details? - -> `optional` **details**: `string` - -Defined in: [js-server-sdk/src/exceptions/index.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L12) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) - -*** - -### statusCode - -> **statusCode**: `number` - -Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/exceptions/index.ts#L10) - -#### Inherited from - -[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/enumerations/PeerStatus.md b/versioned_docs/version-0.26.0/api/server/enumerations/PeerStatus.md deleted file mode 100644 index e8b1cb45..00000000 --- a/versioned_docs/version-0.26.0/api/server/enumerations/PeerStatus.md +++ /dev/null @@ -1,23 +0,0 @@ -# Enumeration: PeerStatus - -Defined in: fishjam-openapi/dist/index.d.ts:407 - -Informs about the peer status - -## Export - -## Enumeration Members - -### Connected - -> **Connected**: `"connected"` - -Defined in: fishjam-openapi/dist/index.d.ts:408 - -*** - -### Disconnected - -> **Disconnected**: `"disconnected"` - -Defined in: fishjam-openapi/dist/index.d.ts:409 diff --git a/versioned_docs/version-0.26.0/api/server/enumerations/RoomType.md b/versioned_docs/version-0.26.0/api/server/enumerations/RoomType.md deleted file mode 100644 index dbda38c4..00000000 --- a/versioned_docs/version-0.26.0/api/server/enumerations/RoomType.md +++ /dev/null @@ -1,55 +0,0 @@ -# Enumeration: RoomType - -Defined in: fishjam-openapi/dist/index.d.ts:535 - -The use-case of the room. If not provided, this defaults to conference. - -## Export - -## Enumeration Members - -### AudioOnly - -> **AudioOnly**: `"audio_only"` - -Defined in: fishjam-openapi/dist/index.d.ts:537 - -*** - -### AudioOnlyLivestream - -> **AudioOnlyLivestream**: `"audio_only_livestream"` - -Defined in: fishjam-openapi/dist/index.d.ts:541 - -*** - -### Broadcaster - -> **Broadcaster**: `"broadcaster"` - -Defined in: fishjam-openapi/dist/index.d.ts:538 - -*** - -### Conference - -> **Conference**: `"conference"` - -Defined in: fishjam-openapi/dist/index.d.ts:540 - -*** - -### FullFeature - -> **FullFeature**: `"full_feature"` - -Defined in: fishjam-openapi/dist/index.d.ts:536 - -*** - -### Livestream - -> **Livestream**: `"livestream"` - -Defined in: fishjam-openapi/dist/index.d.ts:539 diff --git a/versioned_docs/version-0.26.0/api/server/enumerations/VideoCodec.md b/versioned_docs/version-0.26.0/api/server/enumerations/VideoCodec.md deleted file mode 100644 index a507aa12..00000000 --- a/versioned_docs/version-0.26.0/api/server/enumerations/VideoCodec.md +++ /dev/null @@ -1,23 +0,0 @@ -# Enumeration: VideoCodec - -Defined in: fishjam-openapi/dist/index.d.ts:833 - -Enforces video codec for each peer in the room - -## Export - -## Enumeration Members - -### H264 - -> **H264**: `"h264"` - -Defined in: fishjam-openapi/dist/index.d.ts:834 - -*** - -### Vp8 - -> **Vp8**: `"vp8"` - -Defined in: fishjam-openapi/dist/index.d.ts:835 diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/RoomConfig.md b/versioned_docs/version-0.26.0/api/server/interfaces/RoomConfig.md deleted file mode 100644 index bb3fff3d..00000000 --- a/versioned_docs/version-0.26.0/api/server/interfaces/RoomConfig.md +++ /dev/null @@ -1,75 +0,0 @@ -# Interface: RoomConfig - -Defined in: fishjam-openapi/dist/index.d.ts:459 - -Room configuration - -## Export - -RoomConfig - -## Properties - -### maxPeers? - -> `optional` **maxPeers**: `null` \| `number` - -Defined in: fishjam-openapi/dist/index.d.ts:465 - -Maximum amount of peers allowed into the room - -#### Memberof - -RoomConfig - -*** - -### public? - -> `optional` **public**: `boolean` - -Defined in: fishjam-openapi/dist/index.d.ts:471 - -True if livestream viewers can omit specifying a token. - -#### Memberof - -RoomConfig - -*** - -### roomType? - -> `optional` **roomType**: [`RoomType`](../enumerations/RoomType.md) - -Defined in: fishjam-openapi/dist/index.d.ts:477 - -#### Memberof - -RoomConfig - -*** - -### videoCodec? - -> `optional` **videoCodec**: [`VideoCodec`](../enumerations/VideoCodec.md) - -Defined in: fishjam-openapi/dist/index.d.ts:483 - -#### Memberof - -RoomConfig - -*** - -### webhookUrl? - -> `optional` **webhookUrl**: `null` \| `string` - -Defined in: fishjam-openapi/dist/index.d.ts:489 - -URL where Fishjam notifications will be sent - -#### Memberof - -RoomConfig diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/StreamerToken.md b/versioned_docs/version-0.26.0/api/server/interfaces/StreamerToken.md deleted file mode 100644 index 80610e53..00000000 --- a/versioned_docs/version-0.26.0/api/server/interfaces/StreamerToken.md +++ /dev/null @@ -1,21 +0,0 @@ -# Interface: StreamerToken - -Defined in: fishjam-openapi/dist/index.d.ts:680 - -Token for authorizing broadcaster streamer connection - -## Export - -StreamerToken - -## Properties - -### token - -> **token**: `string` - -Defined in: fishjam-openapi/dist/index.d.ts:686 - -#### Memberof - -StreamerToken diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/ViewerToken.md b/versioned_docs/version-0.26.0/api/server/interfaces/ViewerToken.md deleted file mode 100644 index cac2aa8c..00000000 --- a/versioned_docs/version-0.26.0/api/server/interfaces/ViewerToken.md +++ /dev/null @@ -1,21 +0,0 @@ -# Interface: ViewerToken - -Defined in: fishjam-openapi/dist/index.d.ts:875 - -Token for authorizing broadcaster viewer connection - -## Export - -ViewerToken - -## Properties - -### token - -> **token**: `string` - -Defined in: fishjam-openapi/dist/index.d.ts:881 - -#### Memberof - -ViewerToken diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentCallbacks.md b/versioned_docs/version-0.26.0/api/server/type-aliases/AgentCallbacks.md deleted file mode 100644 index cce27157..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentCallbacks.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: AgentCallbacks - -> **AgentCallbacks** = `object` - -Defined in: [js-server-sdk/src/types.ts:46](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L46) - -## Properties - -### onClose? - -> `optional` **onClose**: [`CloseEventHandler`](CloseEventHandler.md) - -Defined in: [js-server-sdk/src/types.ts:48](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L48) - -*** - -### onError? - -> `optional` **onError**: [`ErrorEventHandler`](ErrorEventHandler.md) - -Defined in: [js-server-sdk/src/types.ts:47](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L47) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentEvents.md b/versioned_docs/version-0.26.0/api/server/type-aliases/AgentEvents.md deleted file mode 100644 index 08f7da91..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentEvents.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: AgentEvents - -> **AgentEvents** = `{ [K in ExpectedAgentEvents]: (message: NonNullable<{ authenticated?: AgentResponse_Authenticated; trackData?: Omit & { peerId: PeerId }; trackImage?: AgentResponse_TrackImage }[K]>) => void }` - -Defined in: [js-server-sdk/src/agent.ts:48](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L48) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentTrack.md b/versioned_docs/version-0.26.0/api/server/type-aliases/AgentTrack.md deleted file mode 100644 index b5301aa1..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/AgentTrack.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: AgentTrack - -> **AgentTrack** = `Omit`\<`ProtoTrack`, `"id"`\> & `object` - -Defined in: [js-server-sdk/src/agent.ts:28](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L28) - -## Type declaration - -### id - -> **id**: [`TrackId`](TrackId.md) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/AudioCodecParameters.md b/versioned_docs/version-0.26.0/api/server/type-aliases/AudioCodecParameters.md deleted file mode 100644 index efb0dd00..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/AudioCodecParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# Type Alias: AudioCodecParameters - -> **AudioCodecParameters** = `object` - -Defined in: [js-server-sdk/src/agent.ts:31](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L31) - -## Properties - -### channels - -> **channels**: `1` - -Defined in: [js-server-sdk/src/agent.ts:34](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L34) - -*** - -### encoding - -> **encoding**: `"opus"` \| `"pcm16"` - -Defined in: [js-server-sdk/src/agent.ts:32](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L32) - -*** - -### sampleRate - -> **sampleRate**: `16000` \| `24000` \| `48000` - -Defined in: [js-server-sdk/src/agent.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L33) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/ErrorEventHandler.md b/versioned_docs/version-0.26.0/api/server/type-aliases/ErrorEventHandler.md deleted file mode 100644 index d3e8b1ab..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/ErrorEventHandler.md +++ /dev/null @@ -1,15 +0,0 @@ -# Type Alias: ErrorEventHandler() - -> **ErrorEventHandler** = (`msg`) => `void` - -Defined in: [js-server-sdk/src/types.ts:43](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L43) - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `msg` | `Event` | - -## Returns - -`void` diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedEvents.md b/versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedEvents.md deleted file mode 100644 index bf16f8cd..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedEvents.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: ExpectedEvents - -> **ExpectedEvents** = `"roomCreated"` \| `"roomDeleted"` \| `"roomCrashed"` \| `"peerAdded"` \| `"peerDeleted"` \| `"peerConnected"` \| `"peerDisconnected"` \| `"peerMetadataUpdated"` \| `"peerCrashed"` \| `"streamConnected"` \| `"streamDisconnected"` \| `"viewerConnected"` \| `"viewerDisconnected"` \| `"trackAdded"` \| `"trackRemoved"` \| `"trackMetadataUpdated"` - -Defined in: [js-server-sdk/src/ws\_notifier.ts:7](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L7) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/FishjamConfig.md b/versioned_docs/version-0.26.0/api/server/type-aliases/FishjamConfig.md deleted file mode 100644 index 7e2e7d7f..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/FishjamConfig.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: FishjamConfig - -> **FishjamConfig** = `object` - -Defined in: [js-server-sdk/src/types.ts:28](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L28) - -## Properties - -### fishjamId - -> **fishjamId**: `string` - -Defined in: [js-server-sdk/src/types.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L33) - -*** - -### managementToken - -> **managementToken**: `string` - -Defined in: [js-server-sdk/src/types.ts:39](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L39) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackData.md b/versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackData.md deleted file mode 100644 index c53c0b7f..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackData.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: IncomingTrackData - -> **IncomingTrackData** = `Omit`\<`NonNullable`\<`AgentResponse_TrackData`\>, `"peerId"`\> & `object` - -Defined in: [js-server-sdk/src/agent.ts:24](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L24) - -## Type declaration - -### peerId - -> **peerId**: [`PeerId`](PeerId.md) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/NotificationEvents.md b/versioned_docs/version-0.26.0/api/server/type-aliases/NotificationEvents.md deleted file mode 100644 index c69d8e0d..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/NotificationEvents.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: NotificationEvents - -> **NotificationEvents** = `{ [K in ExpectedEvents]: (message: NonNullable<{ authenticated?: ServerMessage_Authenticated; authRequest?: ServerMessage_AuthRequest; channelAdded?: Omit & { roomId: RoomId }; channelRemoved?: Omit & { roomId: RoomId }; componentCrashed?: Omit & { roomId: RoomId }; hlsPlayable?: Omit & { roomId: RoomId }; hlsUploadCrashed?: Omit & { roomId: RoomId }; hlsUploaded?: Omit & { roomId: RoomId }; peerAdded?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; peerConnected?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; peerCrashed?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; peerDeleted?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; peerDisconnected?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; peerMetadataUpdated?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; roomCrashed?: Omit & { roomId: RoomId }; roomCreated?: Omit & { roomId: RoomId }; roomDeleted?: Omit & { roomId: RoomId }; streamConnected?: ServerMessage_StreamConnected; streamDisconnected?: ServerMessage_StreamDisconnected; streamerConnected?: ServerMessage_StreamerConnected; streamerDisconnected?: ServerMessage_StreamerDisconnected; subscribeRequest?: ServerMessage_SubscribeRequest; subscribeResponse?: ServerMessage_SubscribeResponse; trackAdded?: Omit & { roomId: RoomId }; trackForwarding?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; trackForwardingRemoved?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; trackMetadataUpdated?: Omit & { roomId: RoomId }; trackRemoved?: Omit & { roomId: RoomId }; vadNotification?: Omit & { roomId: RoomId }, "peerId"> & { peerId: PeerId }; viewerConnected?: ServerMessage_ViewerConnected; viewerDisconnected?: ServerMessage_ViewerDisconnected }[K]>) => void }` - -Defined in: [js-server-sdk/src/ws\_notifier.ts:70](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L70) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/OutgoingTrackData.md b/versioned_docs/version-0.26.0/api/server/type-aliases/OutgoingTrackData.md deleted file mode 100644 index cb709912..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/OutgoingTrackData.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: OutgoingTrackData - -> **OutgoingTrackData** = `Omit`\<`NonNullable`\<`AgentRequest_TrackData`\>, `"peerId"`\> & `object` - -Defined in: [js-server-sdk/src/agent.ts:26](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L26) - -## Type declaration - -### peerId - -> **peerId**: [`PeerId`](PeerId.md) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/Peer.md b/versioned_docs/version-0.26.0/api/server/type-aliases/Peer.md deleted file mode 100644 index 5c35090e..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/Peer.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type Alias: Peer - -> **Peer** = `Omit`\<`OpenApiPeer`, `"id"`\> & `object` - -Defined in: [js-server-sdk/src/types.ts:20](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L20) - -## Type declaration - -### id - -> **id**: [`PeerId`](PeerId.md) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerAdded.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerAdded.md deleted file mode 100644 index e1db90d6..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerAdded.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerAdded - -> **PeerAdded** = `object`\[`"peerAdded"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:37](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L37) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerConnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerConnected.md deleted file mode 100644 index ddfdaf20..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerConnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerConnected - -> **PeerConnected** = `object`\[`"peerConnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:39](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L39) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerCrashed.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerCrashed.md deleted file mode 100644 index 45279079..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerCrashed.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerCrashed - -> **PeerCrashed** = `object`\[`"peerCrashed"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:42](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L42) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDeleted.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDeleted.md deleted file mode 100644 index 88ff870e..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDeleted.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerDeleted - -> **PeerDeleted** = `object`\[`"peerDeleted"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:38](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L38) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDisconnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDisconnected.md deleted file mode 100644 index bf9aaa5f..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerDisconnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerDisconnected - -> **PeerDisconnected** = `object`\[`"peerDisconnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:40](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L40) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerMetadataUpdated.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerMetadataUpdated.md deleted file mode 100644 index 6ca71aa0..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerMetadataUpdated.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerMetadataUpdated - -> **PeerMetadataUpdated** = `object`\[`"peerMetadataUpdated"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:41](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L41) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerOptions.md b/versioned_docs/version-0.26.0/api/server/type-aliases/PeerOptions.md deleted file mode 100644 index 4c1a0453..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerOptions.md +++ /dev/null @@ -1,7 +0,0 @@ -# Type Alias: PeerOptions - -> **PeerOptions** = [`PeerOptionsAgent`](../interfaces/PeerOptionsAgent.md) \| [`PeerOptionsVapi`](../interfaces/PeerOptionsVapi.md) \| [`PeerOptionsWebRTC`](../interfaces/PeerOptionsWebRTC.md) - -Defined in: fishjam-openapi/dist/index.d.ts:310 - -## Export diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/Room.md b/versioned_docs/version-0.26.0/api/server/type-aliases/Room.md deleted file mode 100644 index 5ce65915..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/Room.md +++ /dev/null @@ -1,29 +0,0 @@ -# Type Alias: Room - -> **Room** = `object` - -Defined in: [js-server-sdk/src/types.ts:22](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L22) - -## Properties - -### config - -> **config**: [`RoomConfig`](../interfaces/RoomConfig.md) - -Defined in: [js-server-sdk/src/types.ts:25](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L25) - -*** - -### id - -> **id**: [`RoomId`](RoomId.md) - -Defined in: [js-server-sdk/src/types.ts:23](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L23) - -*** - -### peers - -> **peers**: [`Peer`](Peer.md)[] - -Defined in: [js-server-sdk/src/types.ts:24](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L24) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCrashed.md b/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCrashed.md deleted file mode 100644 index 085c48c9..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCrashed.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: RoomCrashed - -> **RoomCrashed** = `object`\[`"roomCrashed"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:36](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L36) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCreated.md b/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCreated.md deleted file mode 100644 index 40e2f4cb..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomCreated.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: RoomCreated - -> **RoomCreated** = `object`\[`"roomCreated"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:34](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L34) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomDeleted.md b/versioned_docs/version-0.26.0/api/server/type-aliases/RoomDeleted.md deleted file mode 100644 index 29d8f0d1..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomDeleted.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: RoomDeleted - -> **RoomDeleted** = `object`\[`"roomDeleted"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:35](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L35) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/StreamConnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/StreamConnected.md deleted file mode 100644 index f69327bf..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/StreamConnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: StreamConnected - -> **StreamConnected** = `object`\[`"streamConnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:43](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L43) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/StreamDisconnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/StreamDisconnected.md deleted file mode 100644 index ee9b0040..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/StreamDisconnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: StreamDisconnected - -> **StreamDisconnected** = `object`\[`"streamDisconnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:44](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L44) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackAdded.md b/versioned_docs/version-0.26.0/api/server/type-aliases/TrackAdded.md deleted file mode 100644 index 5f165680..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackAdded.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackAdded - -> **TrackAdded** = `object`\[`"trackAdded"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:47](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L47) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackId.md b/versioned_docs/version-0.26.0/api/server/type-aliases/TrackId.md deleted file mode 100644 index 5b78e878..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackId.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackId - -> **TrackId** = [`Brand`](Brand.md)\<`string`, `"TrackId"`\> - -Defined in: [js-server-sdk/src/agent.ts:36](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L36) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackMetadataUpdated.md b/versioned_docs/version-0.26.0/api/server/type-aliases/TrackMetadataUpdated.md deleted file mode 100644 index fc9f88d6..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackMetadataUpdated.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackMetadataUpdated - -> **TrackMetadataUpdated** = `object`\[`"trackMetadataUpdated"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:49](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L49) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackRemoved.md b/versioned_docs/version-0.26.0/api/server/type-aliases/TrackRemoved.md deleted file mode 100644 index a0daca10..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackRemoved.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackRemoved - -> **TrackRemoved** = `object`\[`"trackRemoved"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:48](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L48) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackType.md b/versioned_docs/version-0.26.0/api/server/type-aliases/TrackType.md deleted file mode 100644 index 66b920dd..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/TrackType.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackType - -> **TrackType** = `"audio"` \| `"video"` - -Defined in: [js-server-sdk/src/agent.ts:30](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L30) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerConnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerConnected.md deleted file mode 100644 index 609c7995..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerConnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: ViewerConnected - -> **ViewerConnected** = `object`\[`"viewerConnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:45](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L45) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerDisconnected.md b/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerDisconnected.md deleted file mode 100644 index 843975c4..00000000 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/ViewerDisconnected.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: ViewerDisconnected - -> **ViewerDisconnected** = `object`\[`"viewerDisconnected"`\] - -Defined in: [js-server-sdk/src/ws\_notifier.ts:46](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L46) diff --git a/versioned_docs/version-0.26.0/api/server/typedoc-sidebar.cjs b/versioned_docs/version-0.26.0/api/server/typedoc-sidebar.cjs deleted file mode 100644 index 1f1cdacd..00000000 --- a/versioned_docs/version-0.26.0/api/server/typedoc-sidebar.cjs +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-check -/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ -const typedocSidebar = {items:[{type:"category",label:"Client",items:[{type:"doc",id:"api/server/classes/FishjamClient",label:"FishjamClient"},{type:"doc",id:"api/server/classes/FishjamWSNotifier",label:"FishjamWSNotifier"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/server/enumerations/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/server/enumerations/RoomType",label:"RoomType"},{type:"doc",id:"api/server/enumerations/VideoCodec",label:"VideoCodec"},{type:"doc",id:"api/server/classes/BadRequestException",label:"BadRequestException"},{type:"doc",id:"api/server/classes/FishjamAgent",label:"FishjamAgent"},{type:"doc",id:"api/server/classes/FishjamBaseException",label:"FishjamBaseException"},{type:"doc",id:"api/server/classes/FishjamNotFoundException",label:"FishjamNotFoundException"},{type:"doc",id:"api/server/classes/ForbiddenException",label:"ForbiddenException"},{type:"doc",id:"api/server/classes/MissingFishjamIdException",label:"MissingFishjamIdException"},{type:"doc",id:"api/server/classes/PeerNotFoundException",label:"PeerNotFoundException"},{type:"doc",id:"api/server/classes/RoomNotFoundException",label:"RoomNotFoundException"},{type:"doc",id:"api/server/classes/ServiceUnavailableException",label:"ServiceUnavailableException"},{type:"doc",id:"api/server/classes/UnauthorizedException",label:"UnauthorizedException"},{type:"doc",id:"api/server/classes/UnknownException",label:"UnknownException"},{type:"doc",id:"api/server/interfaces/PeerOptionsAgent",label:"PeerOptionsAgent"},{type:"doc",id:"api/server/interfaces/PeerOptionsVapi",label:"PeerOptionsVapi"},{type:"doc",id:"api/server/interfaces/PeerOptionsWebRTC",label:"PeerOptionsWebRTC"},{type:"doc",id:"api/server/interfaces/RoomConfig",label:"RoomConfig"},{type:"doc",id:"api/server/interfaces/ServerMessage",label:"ServerMessage"},{type:"doc",id:"api/server/interfaces/StreamerToken",label:"StreamerToken"},{type:"doc",id:"api/server/interfaces/ViewerToken",label:"ViewerToken"},{type:"doc",id:"api/server/type-aliases/AgentCallbacks",label:"AgentCallbacks"},{type:"doc",id:"api/server/type-aliases/AgentEvents",label:"AgentEvents"},{type:"doc",id:"api/server/type-aliases/AgentTrack",label:"AgentTrack"},{type:"doc",id:"api/server/type-aliases/AudioCodecParameters",label:"AudioCodecParameters"},{type:"doc",id:"api/server/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/server/type-aliases/CloseEventHandler",label:"CloseEventHandler"},{type:"doc",id:"api/server/type-aliases/ErrorEventHandler",label:"ErrorEventHandler"},{type:"doc",id:"api/server/type-aliases/ExpectedAgentEvents",label:"ExpectedAgentEvents"},{type:"doc",id:"api/server/type-aliases/ExpectedEvents",label:"ExpectedEvents"},{type:"doc",id:"api/server/type-aliases/FishjamConfig",label:"FishjamConfig"},{type:"doc",id:"api/server/type-aliases/IncomingTrackData",label:"IncomingTrackData"},{type:"doc",id:"api/server/type-aliases/IncomingTrackImage",label:"IncomingTrackImage"},{type:"doc",id:"api/server/type-aliases/NotificationEvents",label:"NotificationEvents"},{type:"doc",id:"api/server/type-aliases/OutgoingTrackData",label:"OutgoingTrackData"},{type:"doc",id:"api/server/type-aliases/Peer",label:"Peer"},{type:"doc",id:"api/server/type-aliases/PeerAdded",label:"PeerAdded"},{type:"doc",id:"api/server/type-aliases/PeerConnected",label:"PeerConnected"},{type:"doc",id:"api/server/type-aliases/PeerCrashed",label:"PeerCrashed"},{type:"doc",id:"api/server/type-aliases/PeerDeleted",label:"PeerDeleted"},{type:"doc",id:"api/server/type-aliases/PeerDisconnected",label:"PeerDisconnected"},{type:"doc",id:"api/server/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/server/type-aliases/PeerMetadataUpdated",label:"PeerMetadataUpdated"},{type:"doc",id:"api/server/type-aliases/PeerOptions",label:"PeerOptions"},{type:"doc",id:"api/server/type-aliases/Room",label:"Room"},{type:"doc",id:"api/server/type-aliases/RoomCrashed",label:"RoomCrashed"},{type:"doc",id:"api/server/type-aliases/RoomCreated",label:"RoomCreated"},{type:"doc",id:"api/server/type-aliases/RoomDeleted",label:"RoomDeleted"},{type:"doc",id:"api/server/type-aliases/RoomId",label:"RoomId"},{type:"doc",id:"api/server/type-aliases/StreamConnected",label:"StreamConnected"},{type:"doc",id:"api/server/type-aliases/StreamDisconnected",label:"StreamDisconnected"},{type:"doc",id:"api/server/type-aliases/TrackAdded",label:"TrackAdded"},{type:"doc",id:"api/server/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/server/type-aliases/TrackMetadataUpdated",label:"TrackMetadataUpdated"},{type:"doc",id:"api/server/type-aliases/TrackRemoved",label:"TrackRemoved"},{type:"doc",id:"api/server/type-aliases/TrackType",label:"TrackType"},{type:"doc",id:"api/server/type-aliases/ViewerConnected",label:"ViewerConnected"},{type:"doc",id:"api/server/type-aliases/ViewerDisconnected",label:"ViewerDisconnected"},{type:"doc",id:"api/server/variables/ServerMessage",label:"ServerMessage"}]}]}; -module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/BandwidthLimits.md b/versioned_docs/version-0.26.0/api/web/type-aliases/BandwidthLimits.md deleted file mode 100644 index cd1bca69..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/BandwidthLimits.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: BandwidthLimits - -> **BandwidthLimits** = `object` - -Defined in: [react-client/src/types/public.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L70) - -## Properties - -### simulcast - -> **simulcast**: [`SimulcastBandwidthLimits`](SimulcastBandwidthLimits.md) - -Defined in: [react-client/src/types/public.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L70) - -*** - -### singleStream - -> **singleStream**: `number` - -Defined in: [react-client/src/types/public.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L70) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/CustomSource.md b/versioned_docs/version-0.26.0/api/web/type-aliases/CustomSource.md deleted file mode 100644 index 54a5eab9..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/CustomSource.md +++ /dev/null @@ -1,40 +0,0 @@ -# Type Alias: CustomSource\ - -> **CustomSource**\<`T`\> = `object` - -Defined in: [react-client/src/types/public.ts:83](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L83) - -## Type Parameters - -| Type Parameter | -| ------ | -| `T` *extends* `string` | - -## Properties - -### id - -> **id**: `T` - -Defined in: [react-client/src/types/public.ts:84](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L84) - -*** - -### stream? - -> `optional` **stream**: `MediaStream` - -Defined in: [react-client/src/types/public.ts:86](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L86) - -*** - -### trackIds? - -> `optional` **trackIds**: `object` - -Defined in: [react-client/src/types/public.ts:85](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L85) - -| Name | Type | -| ------ | ------ | -| `audioId?` | `string` | -| `videoId?` | `string` | diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/DeviceItem.md b/versioned_docs/version-0.26.0/api/web/type-aliases/DeviceItem.md deleted file mode 100644 index 0c2b0fc4..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/DeviceItem.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: DeviceItem - -> **DeviceItem** = `object` - -Defined in: [react-client/src/types/public.ts:55](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L55) - -## Properties - -### deviceId - -> **deviceId**: `string` - -Defined in: [react-client/src/types/public.ts:55](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L55) - -*** - -### label - -> **label**: `string` - -Defined in: [react-client/src/types/public.ts:55](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L55) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesStatus.md b/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesStatus.md deleted file mode 100644 index 35d976b8..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesStatus.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: InitializeDevicesStatus - -> **InitializeDevicesStatus** = `"initialized"` \| `"failed"` \| `"initialized_with_errors"` \| `"already_initialized"` - -Defined in: [react-client/src/types/public.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L9) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/MiddlewareResult.md b/versioned_docs/version-0.26.0/api/web/type-aliases/MiddlewareResult.md deleted file mode 100644 index 426bba5a..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/MiddlewareResult.md +++ /dev/null @@ -1,25 +0,0 @@ -# Type Alias: MiddlewareResult - -> **MiddlewareResult** = `object` - -Defined in: [react-client/src/types/public.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L32) - -## Properties - -### onClear()? - -> `optional` **onClear**: () => `void` - -Defined in: [react-client/src/types/public.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L32) - -#### Returns - -`void` - -*** - -### track - -> **track**: `MediaStreamTrack` - -Defined in: [react-client/src/types/public.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L32) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerId.md b/versioned_docs/version-0.26.0/api/web/type-aliases/PeerId.md deleted file mode 100644 index 02fd87ae..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerId.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: PeerId - -> **PeerId** = [`Brand`](Brand.md)\<`string`, `"PeerId"`\> - -Defined in: [react-client/src/types/public.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L18) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerWithTracks.md b/versioned_docs/version-0.26.0/api/web/type-aliases/PeerWithTracks.md deleted file mode 100644 index 46050b47..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerWithTracks.md +++ /dev/null @@ -1,85 +0,0 @@ -# Type Alias: PeerWithTracks\ - -> **PeerWithTracks**\<`PeerMetadata`, `ServerMetadata`, `T`\> = `object` - -Defined in: [react-client/src/hooks/usePeers.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L14) - -## Type Parameters - -| Type Parameter | Default type | Description | -| ------ | ------ | ------ | -| `PeerMetadata` | - | Type of metadata set by peer while connecting to a room. | -| `ServerMetadata` | - | Type of metadata set by the server while creating a peer. | -| `T` *extends* [`Track`](Track.md) | [`Track`](Track.md) | - | - -## Properties - -### cameraTrack? - -> `optional` **cameraTrack**: `T` - -Defined in: [react-client/src/hooks/usePeers.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L18) - -*** - -### customAudioTracks - -> **customAudioTracks**: `T`[] - -Defined in: [react-client/src/hooks/usePeers.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L23) - -*** - -### customVideoTracks - -> **customVideoTracks**: `T`[] - -Defined in: [react-client/src/hooks/usePeers.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L22) - -*** - -### id - -> **id**: [`PeerId`](PeerId.md) - -Defined in: [react-client/src/hooks/usePeers.ts:15](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L15) - -*** - -### metadata? - -> `optional` **metadata**: [`Metadata`](Metadata.md)\<`PeerMetadata`, `ServerMetadata`\> - -Defined in: [react-client/src/hooks/usePeers.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L16) - -*** - -### microphoneTrack? - -> `optional` **microphoneTrack**: `T` - -Defined in: [react-client/src/hooks/usePeers.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L19) - -*** - -### screenShareAudioTrack? - -> `optional` **screenShareAudioTrack**: `T` - -Defined in: [react-client/src/hooks/usePeers.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L21) - -*** - -### screenShareVideoTrack? - -> `optional` **screenShareVideoTrack**: `T` - -Defined in: [react-client/src/hooks/usePeers.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L20) - -*** - -### tracks - -> **tracks**: `T`[] - -Defined in: [react-client/src/hooks/usePeers.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L17) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/PersistLastDeviceHandlers.md b/versioned_docs/version-0.26.0/api/web/type-aliases/PersistLastDeviceHandlers.md deleted file mode 100644 index 4a415f3f..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/PersistLastDeviceHandlers.md +++ /dev/null @@ -1,42 +0,0 @@ -# Type Alias: PersistLastDeviceHandlers - -> **PersistLastDeviceHandlers** = `object` - -Defined in: [react-client/src/types/public.ts:57](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L57) - -## Properties - -### getLastDevice() - -> **getLastDevice**: (`deviceType`) => `MediaDeviceInfo` \| `null` - -Defined in: [react-client/src/types/public.ts:58](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L58) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `deviceType` | `"audio"` \| `"video"` | - -#### Returns - -`MediaDeviceInfo` \| `null` - -*** - -### saveLastDevice() - -> **saveLastDevice**: (`info`, `deviceType`) => `void` - -Defined in: [react-client/src/types/public.ts:59](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L59) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `info` | `MediaDeviceInfo` | -| `deviceType` | `"audio"` \| `"video"` | - -#### Returns - -`void` diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/RemoteTrack.md b/versioned_docs/version-0.26.0/api/web/type-aliases/RemoteTrack.md deleted file mode 100644 index 375c0c97..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/RemoteTrack.md +++ /dev/null @@ -1,21 +0,0 @@ -# Type Alias: RemoteTrack - -> **RemoteTrack** = [`Track`](Track.md) & `object` - -Defined in: [react-client/src/types/public.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L28) - -## Type declaration - -### setReceivedQuality() - -> **setReceivedQuality**: (`quality`) => `void` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `quality` | [`Variant`](../enumerations/Variant.md) | - -#### Returns - -`void` diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/RoomType.md b/versioned_docs/version-0.26.0/api/web/type-aliases/RoomType.md deleted file mode 100644 index 27fa7c89..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/RoomType.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: RoomType - -> **RoomType** = `"conference"` \| `"livestream"` \| `"audio_only"` - -Defined in: [react-client/src/hooks/useSandbox.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useSandbox.ts#L19) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/SimulcastBandwidthLimits.md b/versioned_docs/version-0.26.0/api/web/type-aliases/SimulcastBandwidthLimits.md deleted file mode 100644 index 20695fec..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/SimulcastBandwidthLimits.md +++ /dev/null @@ -1,29 +0,0 @@ -# Type Alias: SimulcastBandwidthLimits - -> **SimulcastBandwidthLimits** = `object` - -Defined in: [react-client/src/types/public.ts:62](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L62) - -## Properties - -### 1 - -> **1**: `number` - -Defined in: [react-client/src/types/public.ts:63](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L63) - -*** - -### 2 - -> **2**: `number` - -Defined in: [react-client/src/types/public.ts:64](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L64) - -*** - -### 3 - -> **3**: `number` - -Defined in: [react-client/src/types/public.ts:65](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L65) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/StreamConfig.md b/versioned_docs/version-0.26.0/api/web/type-aliases/StreamConfig.md deleted file mode 100644 index a6d99ca0..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/StreamConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type Alias: StreamConfig - -> **StreamConfig** = `object` - -Defined in: [react-client/src/types/public.ts:68](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L68) - -## Properties - -### sentQualities? - -> `optional` **sentQualities**: [`Variant`](../enumerations/Variant.md)[] \| `false` - -Defined in: [react-client/src/types/public.ts:68](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L68) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/Track.md b/versioned_docs/version-0.26.0/api/web/type-aliases/Track.md deleted file mode 100644 index 9003910e..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/Track.md +++ /dev/null @@ -1,45 +0,0 @@ -# Type Alias: Track - -> **Track** = `object` - -Defined in: [react-client/src/types/public.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L20) - -## Properties - -### metadata? - -> `optional` **metadata**: `TrackMetadata` - -Defined in: [react-client/src/types/public.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L23) - -*** - -### simulcastConfig - -> **simulcastConfig**: [`SimulcastConfig`](../interfaces/SimulcastConfig.md) \| `null` - -Defined in: [react-client/src/types/public.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L24) - -*** - -### stream - -> **stream**: `MediaStream` \| `null` - -Defined in: [react-client/src/types/public.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L21) - -*** - -### track - -> **track**: `MediaStreamTrack` \| `null` - -Defined in: [react-client/src/types/public.ts:25](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L25) - -*** - -### trackId - -> **trackId**: [`TrackId`](TrackId.md) - -Defined in: [react-client/src/types/public.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L22) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/TrackId.md b/versioned_docs/version-0.26.0/api/web/type-aliases/TrackId.md deleted file mode 100644 index ca413b63..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/TrackId.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackId - -> **TrackId** = [`Brand`](Brand.md)\<`string`, `"TrackId"`\> - -Defined in: [react-client/src/types/public.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L17) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/TrackMiddleware.md b/versioned_docs/version-0.26.0/api/web/type-aliases/TrackMiddleware.md deleted file mode 100644 index c12eddd8..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/TrackMiddleware.md +++ /dev/null @@ -1,5 +0,0 @@ -# Type Alias: TrackMiddleware - -> **TrackMiddleware** = (`track`) => [`MiddlewareResult`](MiddlewareResult.md) \| `Promise`\<[`MiddlewareResult`](MiddlewareResult.md)\> \| `null` - -Defined in: [react-client/src/types/public.ts:33](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L33) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddlewareResult.md b/versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddlewareResult.md deleted file mode 100644 index d49dec8a..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddlewareResult.md +++ /dev/null @@ -1,33 +0,0 @@ -# Type Alias: TracksMiddlewareResult - -> **TracksMiddlewareResult** = `object` - -Defined in: [react-client/src/types/public.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L35) - -## Properties - -### audioTrack - -> **audioTrack**: `MediaStreamTrack` \| `null` - -Defined in: [react-client/src/types/public.ts:37](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L37) - -*** - -### onClear() - -> **onClear**: () => `void` - -Defined in: [react-client/src/types/public.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L38) - -#### Returns - -`void` - -*** - -### videoTrack - -> **videoTrack**: `MediaStreamTrack` - -Defined in: [react-client/src/types/public.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L36) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/UseSandboxProps.md b/versioned_docs/version-0.26.0/api/web/type-aliases/UseSandboxProps.md deleted file mode 100644 index a6a86627..00000000 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/UseSandboxProps.md +++ /dev/null @@ -1,17 +0,0 @@ -# Type Alias: UseSandboxProps - -> **UseSandboxProps** = `object` - -Defined in: [react-client/src/hooks/useSandbox.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useSandbox.ts#L14) - -## Properties - -### configOverride? - -> `optional` **configOverride**: `object` - -Defined in: [react-client/src/hooks/useSandbox.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useSandbox.ts#L16) - -| Name | Type | -| ------ | ------ | -| `sandboxApiUrl?` | `string` | diff --git a/versioned_docs/version-0.26.0/how-to/backend/production-deployment.mdx b/versioned_docs/version-0.26.0/how-to/backend/production-deployment.mdx deleted file mode 100644 index 04917c47..00000000 --- a/versioned_docs/version-0.26.0/how-to/backend/production-deployment.mdx +++ /dev/null @@ -1,298 +0,0 @@ ---- -type: how-to -description: Deploy your Fishjam backend safely to production, moving from sandbox to a production-ready setup. ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# How to Deploy Fishjam to Production - -**How-to Guide** - _Deploy your Fishjam backend safely to production_ - -This guide covers the essential steps to move from development (using the Sandbox API) to a production-ready Fishjam backend deployment. - -## Prerequisites - -- Working Fishjam backend (see [Backend Quick Start](../../tutorials/backend-quick-start)) -- Production Fishjam environment (not Sandbox) -- Domain and SSL certificates for your backend -- Production database and infrastructure - -## Step 1: Set up production Fishjam environment - -### Get production credentials - -1. Log in to [Fishjam Dashboard](https://fishjam.io/app) -2. Create or select your **Production** environment (not Sandbox) -3. Copy your production **Fishjam ID** and **Management Token** -4. Note: These are different from your sandbox credentials - -### Environment variables setup - -Create production environment variables: - -```bash -# Production Fishjam credentials -FISHJAM_ID="your-production-fishjam-id" -FISHJAM_MANAGEMENT_TOKEN="your-production-management-token" - -# Your application settings -NODE_ENV="production" -PORT="3000" -DATABASE_URL="your-production-database-url" - -# Security settings -JWT_SECRET="your-secure-jwt-secret" -CORS_ORIGIN="https://yourdomain.com" -``` - -## Step 2: Implement proper authentication - -### Replace Sandbox API calls - -Remove any Sandbox API dependencies from your client code: - -```typescript -// @noErrors: 2451 -import { useSandbox } from "@fishjam-cloud/react-client"; -import express from "express"; - -const authenticateUser = {} as any; -const app = express(); - -const { getSandboxPeerToken } = useSandbox(); - -const userToken = ""; -const roomName = ""; -const userName = ""; - -// ---cut--- -// ❌ Remove: Sandbox API calls -const peerToken = await getSandboxPeerToken(roomName, userName); - -// ✅ Replace with: Your authenticated API -const response = await fetch("https://your-backend.com/api/join-room", { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${userToken}`, - }, - body: JSON.stringify({ roomName, userName }), -}); -``` - -### Implement user authentication - -```typescript -// @noErrors: 2339 -const jwt = {} as any; -import { FishjamClient, Room } from "@fishjam-cloud/js-server-sdk"; -import express from "express"; - -const app = express(); -const getUserById = async (userId: string) => ({ - id: userId, - name: "User", - avatar: "", - role: "user", -}); -const getOrCreateRoom = async (roomName: string) => - ({ id: "room-id" }) as unknown as Room; -const canUserJoinRoom = (user: any, room: any) => true; -process.env.FISHJAM_ID = ""; -process.env.FISHJAM_MANAGEMENT_TOKEN = ""; -process.env.JWT_SECRET = ""; - -// ---cut--- -const fishjamClient = new FishjamClient({ - fishjamId: process.env.FISHJAM_ID!, - managementToken: process.env.FISHJAM_MANAGEMENT_TOKEN!, -}); - -// Authentication middleware -const authenticateUser = async ( - req: express.Request, - res: express.Response, - next: express.NextFunction, -) => { - try { - const token = req.headers.authorization?.replace("Bearer ", ""); - if (!token) { - return res.status(401).json({ error: "Authentication required" }); - } - - const decoded = jwt.verify(token, process.env.JWT_SECRET); - req.user = await getUserById(decoded.userId); - next(); - } catch (error) { - res.status(401).json({ error: "Invalid token" }); - } -}; - -// Protected endpoint for joining rooms -app.post("/api/join-room", authenticateUser, async (req, res) => { - try { - const { roomName } = req.body; - const user = req.user; - - // Create or get room - const room = await getOrCreateRoom(roomName); - - // Verify user has permission to join this room - if (!canUserJoinRoom(user, room)) { - return res.status(403).json({ error: "Access denied" }); - } - - // Create peer with user metadata - const { peer, peerToken } = await fishjamClient.createPeer(room.id, { - metadata: { - userId: user.id, - name: user.name, - avatar: user.avatar, - role: user.role, - }, - }); - - res.json({ peerToken }); - } catch (error) { - console.error("Join room error:", error); - res.status(500).json({ error: "Failed to join room" }); - } -}); -``` - -## (Optional) Step 3: Handle webhooks and events - -You may wish to receive events from Fishjam regarding created rooms and peers. -All you need for this is a single api endpoint: - -### Webhook endpoint - -```typescript -import express from "express"; -const crypto = {} as any; -const app = express(); - -const handlePeerConnected = {} as any; -const handlePeerDisconnected = {} as any; -const handleRoomEmpty = {} as any; - -// ---cut--- -// Webhook signature verification -const verifyWebhookSignature = ( - req: express.Request, - res: express.Response, - next: express.NextFunction, -) => { - const signature = req.headers["x-fishjam-signature"]; - const payload = JSON.stringify(req.body); - - const expectedSignature = crypto - .createHmac("sha256", process.env.WEBHOOK_SECRET) - .update(payload, "utf8") - .digest("hex"); - - if (signature !== expectedSignature) { - return res.status(401).json({ error: "Invalid signature" }); - } - - next(); -}; - -// Webhook handler -app.post( - "/api/webhooks/fishjam", - express.raw({ type: "application/json" }), - verifyWebhookSignature, - (req: express.Request, res: express.Response) => { - const event = req.body; - - switch (event.type) { - case "peer_connected": - handlePeerConnected(event.data); - break; - case "peer_disconnected": - handlePeerDisconnected(event.data); - break; - case "room_empty": - handleRoomEmpty(event.data); - break; - default: - console.log("Unhandled event type:", event.type); - } - - res.status(200).json({ received: true }); - }, -); -``` - -### Enabling webhooks - -Now, with your endpoint setup, all you need to do is supply your webhook endpoint to Fishjam when creating a room: - -```typescript -import { FishjamClient } from "@fishjam-cloud/js-server-sdk"; -const fishjamClient = {} as any; - -// ---cut--- -const createRoomWithWebhooks = async ( - roomName: string, - roomType = "conference", -) => { - const room = await fishjamClient.createRoom({ - roomType, - webhookUrl: `${process.env.BASE_URL}/api/webhooks/fishjam`, - }); - - return room; -}; -``` - -## Common production issues - -### Issue: Token expiration handling - -Peer tokens expire 24h after creation. -We encourage keeping room and peer lifetimes as short as possible -(typically a single room corresponds to a single video call or stream). -However, if you wish to reuse a single peer over multiple days, you can make use of token refreshing: - - - - - ```ts - import { FishjamClient, RoomId, PeerId } from "@fishjam-cloud/js-server-sdk"; - const fishjamClient = new FishjamClient({ - fishjamId: "", - managementToken: "", - }); - const roomId = "" as RoomId; - const peerId = "" as PeerId; - - // ---cut--- - const newToken = fishjamClient.refreshPeerToken(roomId, peerId); - ``` - - - - - - ```python - new_token = fishjam_client.refresh_peer_token(room_id, peer_id) - ``` - - - - -## See also - -For scaling considerations: - -- [Understanding Fishjam Architecture](../../explanation/architecture) -- [Security best practices](../../explanation/security-tokens) - -For specific backend frameworks: - -- [FastAPI example](../../how-to/backend/fastapi-example) -- [Fastify example](../../how-to/backend/fastify-example) diff --git a/versioned_docs/version-0.27.0/tutorials/livestreaming.mdx b/versioned_docs/version-0.27.0/tutorials/livestreaming.mdx index a1cca7af..e16d655c 100644 --- a/versioned_docs/version-0.27.0/tutorials/livestreaming.mdx +++ b/versioned_docs/version-0.27.0/tutorials/livestreaming.mdx @@ -209,7 +209,7 @@ We can now start sending media, which we can obtain from the user's camera, scre If you want to continue screen sharing when the app goes to the background, you need to: 1. Enable VoIP background mode by setting `enableVoIPBackgroundMode: true` in the plugin configuration or adding the VoIP background mode to your `Info.plist` - 2. Use the [`useCallKitService`](../../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session + 2. Use the [`useCallKitService`](../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session See the [background calls documentation](../how-to/client/background-streaming) for detailed instructions and code examples. diff --git a/versioned_docs/version-0.28.0/tutorials/livestreaming.mdx b/versioned_docs/version-0.28.0/tutorials/livestreaming.mdx index eb80db0d..09ccc9d8 100644 --- a/versioned_docs/version-0.28.0/tutorials/livestreaming.mdx +++ b/versioned_docs/version-0.28.0/tutorials/livestreaming.mdx @@ -209,7 +209,7 @@ We can now start sending media, which we can obtain from the user's camera, scre If you want to continue screen sharing when the app goes to the background, you need to: 1. Enable VoIP background mode by setting `enableVoIPBackgroundMode: true` in the plugin configuration or adding the VoIP background mode to your `Info.plist` - 2. Use the [`useCallKitService`](../../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session + 2. Use the [`useCallKitService`](../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session See the [background calls documentation](../how-to/client/background-streaming) for detailed instructions and code examples. diff --git a/versioned_docs/version-0.26.0/_common/agents/definition.mdx b/versioned_docs/version-0.29.0/_common/agents/definition.mdx similarity index 100% rename from versioned_docs/version-0.26.0/_common/agents/definition.mdx rename to versioned_docs/version-0.29.0/_common/agents/definition.mdx diff --git a/versioned_docs/version-0.26.0/_common/agents/remember-to-disconnect.mdx b/versioned_docs/version-0.29.0/_common/agents/remember-to-disconnect.mdx similarity index 100% rename from versioned_docs/version-0.26.0/_common/agents/remember-to-disconnect.mdx rename to versioned_docs/version-0.29.0/_common/agents/remember-to-disconnect.mdx diff --git a/versioned_docs/version-0.26.0/_common/agents/subscriptions.mdx b/versioned_docs/version-0.29.0/_common/agents/subscriptions.mdx similarity index 100% rename from versioned_docs/version-0.26.0/_common/agents/subscriptions.mdx rename to versioned_docs/version-0.29.0/_common/agents/subscriptions.mdx diff --git a/versioned_docs/version-0.29.0/ai-skill.mdx b/versioned_docs/version-0.29.0/ai-skill.mdx new file mode 100644 index 00000000..b71a7eb4 --- /dev/null +++ b/versioned_docs/version-0.29.0/ai-skill.mdx @@ -0,0 +1,48 @@ +--- +sidebar_position: 1 +title: Build Fishjam apps with AI +sidebar_label: Build with AI +description: "The Fishjam Skill gives your AI coding assistant up-to-date, correct guidance for building Fishjam apps: right SDK, real APIs, secure auth." +slug: /ai-skill +--- + +# Build Fishjam apps with AI + +The **Fishjam Skill** gives any skills-compatible coding assistant accurate, always-current Fishjam expertise. With it installed, your assistant generates code that uses the right SDK, real API names, and secure auth patterns from the first prompt. + +## What it covers + +The skill is one entry in Software Mansion's `skills` plugin, and it spans the whole Fishjam stack — backend, web, and mobile: + +- **Platform fundamentals** — rooms, peers, tracks, the two-tier auth model, notifications, and the REST API. +- **Server SDKs (Node & Python)** — including AI voice agents and the Gemini Live integration. +- **React web client** — the `@fishjam-cloud/react-client` hooks and providers. +- **React Native / Expo client** — permissions, foreground service, CallKit, screen share, and Picture-in-Picture. + +## Install + +Install the skill into Claude Code (recommended) or any skills-compatible assistant: + +```bash +npx skills add software-mansion-labs/skills +``` + +## How it activates + +No command needed. The skill auto-loads whenever you mention Fishjam or a Fishjam SDK/API in your prompts, like `@fishjam-cloud/react-client`, `FishjamClient`, or `managementToken`. + +## Why it helps + +The skill turns your assistant into a Fishjam specialist: + +- **Always current** — it tracks the latest SDKs and APIs, so your assistant builds on today's Fishjam instead of stale examples. +- **Secure by default** — authentication and tokens follow the patterns we recommend for production, from the first line of code. +- **Full-stack in one place** — backend, web, and mobile share the same guidance, so features connect cleanly end to end. + +:::tip +The skill follows the latest Fishjam release, so your assistant always works against current SDKs and APIs. +::: + +## Links + +- Source and installation details: [software-mansion-labs/skills](https://github.com/software-mansion-labs/skills) (MIT). diff --git a/versioned_docs/version-0.26.0/api/_category_.json b/versioned_docs/version-0.29.0/api/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/api/_category_.json rename to versioned_docs/version-0.29.0/api/_category_.json diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index.md b/versioned_docs/version-0.29.0/api/custom-video-source/index.md new file mode 100644 index 00000000..8ad95144 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index.md @@ -0,0 +1,6 @@ +# @fishjam-cloud/react-native-custom-video-source + +## Modules + +- [index](index/index.md) +- [webgpu](webgpu/index.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedForwardTrack.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedForwardTrack.md new file mode 100644 index 00000000..8aa0ffd8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedForwardTrack.md @@ -0,0 +1,19 @@ +# Function: useManagedForwardTrack() + +> **useManagedForwardTrack**(`enabled`): [`ManagedForwardTrack`](../interfaces/ManagedForwardTrack.md) + +Defined in: [src/internal/useManagedForwardTrack.ts:29](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedForwardTrack.ts#L29) + +Owns the async lifecycle of a forwarding custom video track: creates it while `enabled`, +exposes the handle + stream once ready, and stops the tracks on disable/unmount (also when +creation resolves after the owner already unmounted). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `enabled` | `boolean` | + +## Returns + +[`ManagedForwardTrack`](../interfaces/ManagedForwardTrack.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedPooledTrack.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedPooledTrack.md new file mode 100644 index 00000000..b90b7a5d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/functions/useManagedPooledTrack.md @@ -0,0 +1,22 @@ +# Function: useManagedPooledTrack() + +> **useManagedPooledTrack**(`enabled`, `width`, `height`, `poolSize`): [`ManagedPooledTrack`](../interfaces/ManagedPooledTrack.md) + +Defined in: [src/internal/useManagedPooledTrack.ts:77](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L77) + +Owns the async lifecycle of a surface pool + pooled custom video track: allocates both while +`enabled` (re-allocates when the dimensions change), exposes worklet-ready descriptors, and +tears down in the correct order (stop tracks, then dispose the pool) on disable/unmount. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `enabled` | `boolean` | +| `width` | `number` | +| `height` | `number` | +| `poolSize` | `number` | + +## Returns + +[`ManagedPooledTrack`](../interfaces/ManagedPooledTrack.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/index.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/index.md new file mode 100644 index 00000000..cc0ed53a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/index.md @@ -0,0 +1,27 @@ +# index + +Publish your own video frames to Fishjam. + +Source-lifecycle hooks that create a custom video track, publish it, and clean it up — you +supply the frames from any source. Two modes, picked by how you produce frames: + +- [useManagedForwardTrack](functions/useManagedForwardTrack.md) — you already have finished native buffers (a camera, a native + ML pipeline, a compositor); forward each buffer pointer with `forwardFrame` from + `@fishjam-cloud/react-native-webrtc`. +- [useManagedPooledTrack](functions/useManagedPooledTrack.md) — you render the frames yourself; allocate a surface pool, draw + into it, and hand each frame back with `pushFrame`. The `@fishjam-cloud/react-native-custom-video-source/webgpu` + entry point provides a WebGPU camera-rendering toolkit for this mode. + +For a ready-made VisionCamera integration on top of this, use +`@fishjam-cloud/react-native-vision-camera-source`. + +## Interfaces + +- [ManagedForwardTrack](interfaces/ManagedForwardTrack.md) +- [ManagedPooledTrack](interfaces/ManagedPooledTrack.md) +- [WorkletBufferDescriptor](interfaces/WorkletBufferDescriptor.md) + +## Functions + +- [useManagedForwardTrack](functions/useManagedForwardTrack.md) +- [useManagedPooledTrack](functions/useManagedPooledTrack.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedForwardTrack.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedForwardTrack.md new file mode 100644 index 00000000..2ad98329 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedForwardTrack.md @@ -0,0 +1,30 @@ +# Interface: ManagedForwardTrack + +Defined in: [src/internal/useManagedForwardTrack.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedForwardTrack.ts#L16) + +State of a forwarding custom video track managed by [useManagedForwardTrack](../functions/useManagedForwardTrack.md). +While the track is being created (or after an error) `track` and `stream` are `null`. + +## Properties + +### error + +> **error**: `null` \| `Error` + +Defined in: [src/internal/useManagedForwardTrack.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedForwardTrack.ts#L19) + +*** + +### stream + +> **stream**: `null` \| `MediaStream` + +Defined in: [src/internal/useManagedForwardTrack.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedForwardTrack.ts#L18) + +*** + +### track + +> **track**: `null` \| `ForwardTrack` + +Defined in: [src/internal/useManagedForwardTrack.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedForwardTrack.ts#L17) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedPooledTrack.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedPooledTrack.md new file mode 100644 index 00000000..751de27d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/ManagedPooledTrack.md @@ -0,0 +1,40 @@ +# Interface: ManagedPooledTrack + +Defined in: [src/internal/useManagedPooledTrack.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L26) + +State of a pooled custom video track managed by [useManagedPooledTrack](../functions/useManagedPooledTrack.md). +While the pool and track are being created (or after an error) all fields are `null`. + +## Properties + +### bufferDescriptors + +> **bufferDescriptors**: `null` \| [`WorkletBufferDescriptor`](WorkletBufferDescriptor.md)[] + +Defined in: [src/internal/useManagedPooledTrack.ts:30](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L30) + +Plain per-surface descriptors (the pool object itself is not worklet-serializable). + +*** + +### error + +> **error**: `null` \| `Error` + +Defined in: [src/internal/useManagedPooledTrack.ts:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L31) + +*** + +### stream + +> **stream**: `null` \| `MediaStream` + +Defined in: [src/internal/useManagedPooledTrack.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L28) + +*** + +### track + +> **track**: `null` \| `PooledTrack` + +Defined in: [src/internal/useManagedPooledTrack.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L27) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/WorkletBufferDescriptor.md b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/WorkletBufferDescriptor.md new file mode 100644 index 00000000..45f7d36f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/index/interfaces/WorkletBufferDescriptor.md @@ -0,0 +1,37 @@ +# Interface: WorkletBufferDescriptor + +Defined in: [src/internal/useManagedPooledTrack.ts:15](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L15) + +One pooled output surface as plain values the frame worklet can capture and import itself. + +## Properties + +### height + +> **height**: `number` + +Defined in: [src/internal/useManagedPooledTrack.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L19) + +*** + +### index + +> **index**: `number` + +Defined in: [src/internal/useManagedPooledTrack.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L16) + +*** + +### surfaceHandle + +> **surfaceHandle**: `bigint` + +Defined in: [src/internal/useManagedPooledTrack.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L17) + +*** + +### width + +> **width**: `number` + +Defined in: [src/internal/useManagedPooledTrack.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/internal/useManagedPooledTrack.ts#L18) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/typedoc-sidebar.cjs b/versioned_docs/version-0.29.0/api/custom-video-source/typedoc-sidebar.cjs new file mode 100644 index 00000000..e3d3c40f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/typedoc-sidebar.cjs @@ -0,0 +1,4 @@ +// @ts-check +/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ +const typedocSidebar = {items:[{type:"category",label:"index",items:[{type:"category",label:"Interfaces",items:[{type:"doc",id:"api/custom-video-source/index/interfaces/ManagedForwardTrack",label:"ManagedForwardTrack"},{type:"doc",id:"api/custom-video-source/index/interfaces/ManagedPooledTrack",label:"ManagedPooledTrack"},{type:"doc",id:"api/custom-video-source/index/interfaces/WorkletBufferDescriptor",label:"WorkletBufferDescriptor"}]},{type:"category",label:"Functions",items:[{type:"doc",id:"api/custom-video-source/index/functions/useManagedForwardTrack",label:"useManagedForwardTrack"},{type:"doc",id:"api/custom-video-source/index/functions/useManagedPooledTrack",label:"useManagedPooledTrack"}]}],link:{type:"doc",id:"api/custom-video-source/index/index"}},{type:"category",label:"webgpu",items:[{type:"category",label:"Interfaces",items:[{type:"doc",id:"api/custom-video-source/webgpu/interfaces/CameraPassthroughPipelineOptions",label:"CameraPassthroughPipelineOptions"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/CreateCameraShaderBindingsOptions",label:"CreateCameraShaderBindingsOptions"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/UseCameraWebGpuDeviceResult",label:"UseCameraWebGpuDeviceResult"}]},{type:"category",label:"Type Aliases",items:[{type:"doc",id:"api/custom-video-source/webgpu/type-aliases/WebGpuRuntime",label:"WebGpuRuntime"}]},{type:"category",label:"Functions",items:[{type:"doc",id:"api/custom-video-source/webgpu/functions/getWebGpuRuntime",label:"getWebGpuRuntime"},{type:"doc",id:"api/custom-video-source/webgpu/functions/useCameraWebGpuDeviceWithOverride",label:"useCameraWebGpuDeviceWithOverride"}]},{type:"category",label:"WebGPU",items:[{type:"doc",id:"api/custom-video-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport",label:"assertWebGpuDeviceSupportsCameraImport"},{type:"doc",id:"api/custom-video-source/webgpu/functions/computeAspectFillCrop",label:"computeAspectFillCrop"},{type:"doc",id:"api/custom-video-source/webgpu/functions/computeSquareCrop",label:"computeSquareCrop"},{type:"doc",id:"api/custom-video-source/webgpu/functions/createCameraBindGroup",label:"createCameraBindGroup"},{type:"doc",id:"api/custom-video-source/webgpu/functions/createCameraPassthroughPipeline",label:"createCameraPassthroughPipeline"},{type:"doc",id:"api/custom-video-source/webgpu/functions/createCameraShaderBindings",label:"createCameraShaderBindings"},{type:"doc",id:"api/custom-video-source/webgpu/functions/createCameraTextureResolver",label:"createCameraTextureResolver"},{type:"doc",id:"api/custom-video-source/webgpu/functions/encodeCameraPassthrough",label:"encodeCameraPassthrough"},{type:"doc",id:"api/custom-video-source/webgpu/functions/getOutputSurfaceFormat",label:"getOutputSurfaceFormat"},{type:"doc",id:"api/custom-video-source/webgpu/functions/getRequiredWebGpuCameraFeatures",label:"getRequiredWebGpuCameraFeatures"},{type:"doc",id:"api/custom-video-source/webgpu/functions/packFrameCropParams",label:"packFrameCropParams"},{type:"doc",id:"api/custom-video-source/webgpu/functions/resolveCameraTexture",label:"resolveCameraTexture"},{type:"doc",id:"api/custom-video-source/webgpu/functions/useCameraWebGpuDevice",label:"useCameraWebGpuDevice"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/CameraPassthroughPipeline",label:"CameraPassthroughPipeline"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/CameraShaderBindings",label:"CameraShaderBindings"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/CameraTextureResolver",label:"CameraTextureResolver"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/FrameCrop",label:"FrameCrop"},{type:"doc",id:"api/custom-video-source/webgpu/interfaces/WebGpuFrameRenderContext",label:"WebGpuFrameRenderContext"},{type:"doc",id:"api/custom-video-source/webgpu/type-aliases/WebGpuFrameRenderFunction",label:"WebGpuFrameRenderFunction"},{type:"doc",id:"api/custom-video-source/webgpu/variables/FrameCropParams",label:"FrameCropParams"},{type:"doc",id:"api/custom-video-source/webgpu/variables/sampleCamera",label:"sampleCamera"}]}],link:{type:"doc",id:"api/custom-video-source/webgpu/index"}}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md new file mode 100644 index 00000000..09819ff8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md @@ -0,0 +1,19 @@ +# Function: assertWebGpuDeviceSupportsCameraImport() + +> **assertWebGpuDeviceSupportsCameraImport**(`device`): `void` + +Defined in: [src/webgpu/requiredFeatures.ts:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/requiredFeatures.ts#L31) + +Throws a descriptive error when `device` is missing any feature required to import camera +frames or Fishjam output surfaces on this platform. Called automatically on devices passed as +an override; call it yourself to validate a device early. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeAspectFillCrop.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeAspectFillCrop.md new file mode 100644 index 00000000..f48d3d85 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeAspectFillCrop.md @@ -0,0 +1,30 @@ +# Function: computeAspectFillCrop() + +> **computeAspectFillCrop**(`sourceWidth`, `sourceHeight`, `targetAspect`, `uv00`, `uv01`, `uv10`, `uv11`): [`FrameCrop`](../interfaces/FrameCrop.md) + +Defined in: [src/webgpu/cropUtilities.ts:86](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L86) + +Center-crop of a (sourceWidth × sourceHeight) frame to the target aspect ratio (width/height). +A no-op full-frame crop when the source already has the target aspect. Worklet-safe. + +Feed it the upright camera size from the render context: +`computeAspectFillCrop(context.cameraWidth, context.cameraHeight, context.outputWidth / context.outputHeight)`. + +The optional `uv00..uv11` scalars form a UV-space transform applied around the frame center +(identity by default). + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `sourceWidth` | `number` | `undefined` | +| `sourceHeight` | `number` | `undefined` | +| `targetAspect` | `number` | `undefined` | +| `uv00` | `number` | `1` | +| `uv01` | `number` | `0` | +| `uv10` | `number` | `0` | +| `uv11` | `number` | `1` | + +## Returns + +[`FrameCrop`](../interfaces/FrameCrop.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeSquareCrop.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeSquareCrop.md new file mode 100644 index 00000000..b085b97d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/computeSquareCrop.md @@ -0,0 +1,23 @@ +# Function: computeSquareCrop() + +> **computeSquareCrop**(`sourceWidth`, `sourceHeight`, `uv00`, `uv01`, `uv10`, `uv11`): [`FrameCrop`](../interfaces/FrameCrop.md) + +Defined in: [src/webgpu/cropUtilities.ts:123](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L123) + +Square center-crop of a (sourceWidth × sourceHeight) frame — the usual shape for square model +inputs. Worklet-safe. The optional `uv00..uv11` scalars are as in [computeAspectFillCrop](computeAspectFillCrop.md). + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `sourceWidth` | `number` | `undefined` | +| `sourceHeight` | `number` | `undefined` | +| `uv00` | `number` | `1` | +| `uv01` | `number` | `0` | +| `uv10` | `number` | `0` | +| `uv11` | `number` | `1` | + +## Returns + +[`FrameCrop`](../interfaces/FrameCrop.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraBindGroup.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraBindGroup.md new file mode 100644 index 00000000..992b85bb --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraBindGroup.md @@ -0,0 +1,24 @@ +# Function: createCameraBindGroup() + +> **createCameraBindGroup**(`device`, `cameraShaderBindings`, `cameraTexture`): `GPUBindGroup` + +Defined in: [src/webgpu/cameraShaderBindings.ts:134](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L134) + +Builds the per-frame bind group for the live camera texture. The source hook already does this +for you when you pass `cameraShaderBindings` in its options (see the render context's +`cameraBindGroup`); call it yourself only for advanced multi-layout setups. Worklet-safe. + +A camera texture expires when the frame ends, so a bind group referencing it must be rebuilt +every frame — never cache the result. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `cameraShaderBindings` | [`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) | +| `cameraTexture` | `GPUExternalTexture` | + +## Returns + +`GPUBindGroup` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraPassthroughPipeline.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraPassthroughPipeline.md new file mode 100644 index 00000000..98b46090 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraPassthroughPipeline.md @@ -0,0 +1,20 @@ +# Function: createCameraPassthroughPipeline() + +> **createCameraPassthroughPipeline**(`device`, `options`): [`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:108](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L108) + +Builds the full-screen camera passthrough pipeline: crop/orientation via [FrameCrop](../interfaces/FrameCrop.md), +platform-correct camera sampling, one triangle. Use it to publish the camera through the WebGPU +tier with zero WGSL of your own, or as the base pass under your overlay passes. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `options` | [`CameraPassthroughPipelineOptions`](../interfaces/CameraPassthroughPipelineOptions.md) | + +## Returns + +[`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraShaderBindings.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraShaderBindings.md new file mode 100644 index 00000000..db6f8fde --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraShaderBindings.md @@ -0,0 +1,29 @@ +# Function: createCameraShaderBindings() + +> **createCameraShaderBindings**(`device`, `options`): [`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) + +Defined in: [src/webgpu/cameraShaderBindings.ts:102](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L102) + +Builds the camera-sampling bindings against the device your pipelines use. Pass the result to +the source hook's `cameraShaderBindings` option and the render context delivers a ready-made +`cameraBindGroup` every frame — set it at [CameraShaderBindings.bindGroupIndex](../interfaces/CameraShaderBindings.md#bindgroupindex) and call +`sampleCamera(uv)` in your fragment shader. + +```ts +const cam = createCameraShaderBindings(device); +const fragment = tgpu.fragmentFn({ in: { uv: d.location(0, d.vec2f) }, out: d.vec4f })((input) => { + return cam.sampleCamera(input.uv); +}); +const wgsl = cam.bindingDeclarations + tgpu.resolve({ externals: { fragment } }); +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `options` | [`CreateCameraShaderBindingsOptions`](../interfaces/CreateCameraShaderBindingsOptions.md) | + +## Returns + +[`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraTextureResolver.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraTextureResolver.md new file mode 100644 index 00000000..2b1e1108 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/createCameraTextureResolver.md @@ -0,0 +1,20 @@ +# Function: createCameraTextureResolver() + +> **createCameraTextureResolver**(`device`, `size`): [`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) + +Defined in: [src/webgpu/cameraTextureResolver.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L32) + +Creates a [CameraTextureResolver](../interfaces/CameraTextureResolver.md) with an owned `rgba8unorm` texture of the given size. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `size` | \{ `height`: `number`; `width`: `number`; \} | +| `size.height` | `number` | +| `size.width` | `number` | + +## Returns + +[`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/encodeCameraPassthrough.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/encodeCameraPassthrough.md new file mode 100644 index 00000000..ce3b0268 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/encodeCameraPassthrough.md @@ -0,0 +1,29 @@ +# Function: encodeCameraPassthrough() + +> **encodeCameraPassthrough**(`device`, `passthrough`, `cameraTexture`, `outputView`, `commandEncoder`, `crop`): `void` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:163](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L163) + +Encodes one full-screen pass drawing the camera into `outputView`, cropped per `crop`. +Worklet-safe; call it inside your render callback, and encode any overlay passes after it on +the same command encoder (with `loadOp: 'load'` so they draw on top). + +At most one call per pipeline instance per frame: the crop lives in a single uniform buffer +written via `queue.writeBuffer`, which lands before the submitted command buffer executes — a +second call in the same frame makes both draws use the second crop. Encode to multiple targets +with different crops by building one pipeline per target. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `passthrough` | [`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) | +| `cameraTexture` | `GPUExternalTexture` | +| `outputView` | `GPUTextureView` | +| `commandEncoder` | `GPUCommandEncoder` | +| `crop` | [`FrameCrop`](../interfaces/FrameCrop.md) | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getOutputSurfaceFormat.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getOutputSurfaceFormat.md new file mode 100644 index 00000000..b4f41ebb --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getOutputSurfaceFormat.md @@ -0,0 +1,13 @@ +# Function: getOutputSurfaceFormat() + +> **getOutputSurfaceFormat**(): `GPUTextureFormat` + +Defined in: [src/webgpu/requiredFeatures.ts:51](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/requiredFeatures.ts#L51) + +The pixel format of Fishjam output surfaces on this platform: `'rgba8unorm'` on Android +(AHardwareBuffer), `'bgra8unorm'` on iOS (IOSurface). Use it as the render-target format of any +pipeline that draws into the output texture — a mismatched format renders wrong or black. + +## Returns + +`GPUTextureFormat` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md new file mode 100644 index 00000000..75feea46 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md @@ -0,0 +1,13 @@ +# Function: getRequiredWebGpuCameraFeatures() + +> **getRequiredWebGpuCameraFeatures**(): `GPUFeatureName`[] + +Defined in: [src/webgpu/requiredFeatures.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/requiredFeatures.ts#L20) + +The GPU features a device must have to import camera frames and Fishjam output surfaces on this +platform. [useCameraWebGpuDevice](useCameraWebGpuDevice.md) requests them for you; pass them yourself as +`requiredFeatures` in `GPUDeviceDescriptor` when you bring your own device. + +## Returns + +`GPUFeatureName`[] diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getWebGpuRuntime.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getWebGpuRuntime.md new file mode 100644 index 00000000..fc52fd6e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/getWebGpuRuntime.md @@ -0,0 +1,20 @@ +# Function: getWebGpuRuntime() + +> **getWebGpuRuntime**(): `object` + +Defined in: [src/webgpu/webGpuRuntime.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/webGpuRuntime.ts#L16) + +Returns the react-native-webgpu runtime singleton, self-healing when the `RNWebGPU` global is +missing on the calling runtime. The library binds the global once at module load, but that +binding can be absent after a crash-recovery runtime reload or an install-ordering flake; +`WebGPUModule.install()` binds it to the calling runtime and is safe to repeat. + +## Returns + +`object` + +## Throws + +When the runtime cannot be installed (react-native-webgpu missing or its native module +not linked) — returning the still-undefined global would only defer the failure to an opaque +per-frame TypeError. diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/packFrameCropParams.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/packFrameCropParams.md new file mode 100644 index 00000000..d63bad96 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/packFrameCropParams.md @@ -0,0 +1,18 @@ +# Function: packFrameCropParams() + +> **packFrameCropParams**(`crop`): `ArrayBuffer` + +Defined in: [src/webgpu/cropUtilities.ts:56](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L56) + +Packs a [FrameCrop](../interfaces/FrameCrop.md) into the [FrameCropParams](../variables/FrameCropParams.md) uniform byte layout. +Worklet-safe; upload the result with `device.queue.writeBuffer(buffer, 0, bytes)`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `crop` | [`FrameCrop`](../interfaces/FrameCrop.md) | + +## Returns + +`ArrayBuffer` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/resolveCameraTexture.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/resolveCameraTexture.md new file mode 100644 index 00000000..52a746bd --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/resolveCameraTexture.md @@ -0,0 +1,24 @@ +# Function: resolveCameraTexture() + +> **resolveCameraTexture**(`device`, `resolver`, `cameraTexture`, `cameraWidth`, `cameraHeight`, `commandEncoder`): `void` + +Defined in: [src/webgpu/cameraTextureResolver.ts:58](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L58) + +Encodes one pass resolving the live camera texture into `resolver.texture`, aspect-filled to +the resolver's size (platform YUV decode included). Worklet-safe; call it inside your render +callback before the passes that sample `resolver.texture`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `resolver` | [`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) | +| `cameraTexture` | `GPUExternalTexture` | +| `cameraWidth` | `number` | +| `cameraHeight` | `number` | +| `commandEncoder` | `GPUCommandEncoder` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDevice.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDevice.md new file mode 100644 index 00000000..ff8283c1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDevice.md @@ -0,0 +1,19 @@ +# Function: useCameraWebGpuDevice() + +> **useCameraWebGpuDevice**(): [`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) + +Defined in: [src/webgpu/useCameraWebGpuDevice.ts:69](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/useCameraWebGpuDevice.ts#L69) + +The app-wide GPUDevice used for camera work, configured with +[getRequiredWebGpuCameraFeatures](getRequiredWebGpuCameraFeatures.md). All callers share one device, so pipelines you build +against it work with the textures the source hook hands your render callback. + +Build your pipelines once the device arrives: +```tsx +const { device } = useCameraWebGpuDevice(); +const effect = useMemo(() => (device ? buildMyEffect(device) : null), [device]); +``` + +## Returns + +[`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md new file mode 100644 index 00000000..ae28affb --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md @@ -0,0 +1,18 @@ +# Function: useCameraWebGpuDeviceWithOverride() + +> **useCameraWebGpuDeviceWithOverride**(`override`): [`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) + +Defined in: [src/webgpu/useCameraWebGpuDevice.ts:97](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/useCameraWebGpuDevice.ts#L97) + +Device resolution for the source hook: the user-provided override (validated) when present, +otherwise the shared device. Always called, so hook order stays stable either way. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `override` | `undefined` \| `GPUDevice` | + +## Returns + +[`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/index.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/index.md new file mode 100644 index 00000000..9d555aa4 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/index.md @@ -0,0 +1,52 @@ +# webgpu + +WebGPU camera toolkit — sample the live camera and render your own content into the video you +publish with `useManagedPooledTrack` (from the package's main entry point). Requires `react-native-webgpu` (an optional peer of +this package; only this entry point loads it). + +- [createCameraShaderBindings](functions/createCameraShaderBindings.md) — sample the live camera from your own shaders via + `sampleCamera(uv)`, with the platform's YUV decode handled for you. +- [createCameraPassthroughPipeline](functions/createCameraPassthroughPipeline.md) / [encodeCameraPassthrough](functions/encodeCameraPassthrough.md) — a ready-made + camera→output pass to publish the camera with zero WGSL, or to build overlays on. +- [createCameraTextureResolver](functions/createCameraTextureResolver.md) — opt-in plain-texture camera for pipelines that can't + sample `texture_external`. +- [useCameraWebGpuDevice](functions/useCameraWebGpuDevice.md) — the shared, camera-import-capable GPUDevice. + +## Interfaces + +- [CameraPassthroughPipelineOptions](interfaces/CameraPassthroughPipelineOptions.md) +- [CreateCameraShaderBindingsOptions](interfaces/CreateCameraShaderBindingsOptions.md) +- [UseCameraWebGpuDeviceResult](interfaces/UseCameraWebGpuDeviceResult.md) + +## Type Aliases + +- [WebGpuRuntime](type-aliases/WebGpuRuntime.md) + +## Functions + +- [getWebGpuRuntime](functions/getWebGpuRuntime.md) +- [useCameraWebGpuDeviceWithOverride](functions/useCameraWebGpuDeviceWithOverride.md) + +## WebGPU + +- [assertWebGpuDeviceSupportsCameraImport](functions/assertWebGpuDeviceSupportsCameraImport.md) +- [computeAspectFillCrop](functions/computeAspectFillCrop.md) +- [computeSquareCrop](functions/computeSquareCrop.md) +- [createCameraBindGroup](functions/createCameraBindGroup.md) +- [createCameraPassthroughPipeline](functions/createCameraPassthroughPipeline.md) +- [createCameraShaderBindings](functions/createCameraShaderBindings.md) +- [createCameraTextureResolver](functions/createCameraTextureResolver.md) +- [encodeCameraPassthrough](functions/encodeCameraPassthrough.md) +- [getOutputSurfaceFormat](functions/getOutputSurfaceFormat.md) +- [getRequiredWebGpuCameraFeatures](functions/getRequiredWebGpuCameraFeatures.md) +- [packFrameCropParams](functions/packFrameCropParams.md) +- [resolveCameraTexture](functions/resolveCameraTexture.md) +- [useCameraWebGpuDevice](functions/useCameraWebGpuDevice.md) +- [CameraPassthroughPipeline](interfaces/CameraPassthroughPipeline.md) +- [CameraShaderBindings](interfaces/CameraShaderBindings.md) +- [CameraTextureResolver](interfaces/CameraTextureResolver.md) +- [FrameCrop](interfaces/FrameCrop.md) +- [WebGpuFrameRenderContext](interfaces/WebGpuFrameRenderContext.md) +- [WebGpuFrameRenderFunction](type-aliases/WebGpuFrameRenderFunction.md) +- [FrameCropParams](variables/FrameCropParams.md) +- [sampleCamera](variables/sampleCamera.md) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipeline.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipeline.md new file mode 100644 index 00000000..ea7f2c4b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipeline.md @@ -0,0 +1,44 @@ +# Interface: CameraPassthroughPipeline + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:78](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L78) + +A ready-made full-screen camera→target render pipeline. Build once at setup with +[createCameraPassthroughPipeline](../functions/createCameraPassthroughPipeline.md); every field is safe to capture into the frame worklet. + +## Properties + +### cameraShaderBindings + +> `readonly` **cameraShaderBindings**: [`CameraShaderBindings`](CameraShaderBindings.md) + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:81](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L81) + +The camera shader bindings the pipeline samples through. + +*** + +### cropBindGroup + +> `readonly` **cropBindGroup**: `GPUBindGroup` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:85](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L85) + +Static bind group with the crop uniform. + +*** + +### cropParamsBuffer + +> `readonly` **cropParamsBuffer**: `GPUBuffer` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:83](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L83) + +Uniform buffer holding the packed FrameCropParams; written by [encodeCameraPassthrough](../functions/encodeCameraPassthrough.md). + +*** + +### pipeline + +> `readonly` **pipeline**: `GPURenderPipeline` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:79](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L79) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md new file mode 100644 index 00000000..da62c4d3 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md @@ -0,0 +1,25 @@ +# Interface: CameraPassthroughPipelineOptions + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:65](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L65) + +Options for [createCameraPassthroughPipeline](../functions/createCameraPassthroughPipeline.md). + +## Properties + +### mirror? + +> `optional` **mirror**: `boolean` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:69](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L69) + +Mirror the camera horizontally (the usual selfie self-view convention). Defaults to `false`. + +*** + +### outputFormat? + +> `optional` **outputFormat**: `GPUTextureFormat` + +Defined in: [src/webgpu/cameraPassthroughPipeline.ts:67](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraPassthroughPipeline.ts#L67) + +Render-target format. Defaults to [getOutputSurfaceFormat](../functions/getOutputSurfaceFormat.md) (the Fishjam output surface). diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraShaderBindings.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraShaderBindings.md new file mode 100644 index 00000000..7c882034 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraShaderBindings.md @@ -0,0 +1,58 @@ +# Interface: CameraShaderBindings + +Defined in: [src/webgpu/cameraShaderBindings.ts:61](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L61) + +Everything a fragment shader needs to sample the live camera. Build once at setup with +[createCameraShaderBindings](../functions/createCameraShaderBindings.md); the fields are safe to capture into the frame worklet. + +## Properties + +### bindGroupIndex + +> `readonly` **bindGroupIndex**: `number` + +Defined in: [src/webgpu/cameraShaderBindings.ts:77](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L77) + +The group index the bindings are declared at. + +*** + +### bindGroupLayout + +> `readonly` **bindGroupLayout**: `GPUBindGroupLayout` + +Defined in: [src/webgpu/cameraShaderBindings.ts:73](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L73) + +Layout of the camera bind group; place it at [bindGroupIndex](#bindgroupindex) in your pipeline layout. + +*** + +### bindingDeclarations + +> `readonly` **bindingDeclarations**: `string` + +Defined in: [src/webgpu/cameraShaderBindings.ts:71](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L71) + +WGSL declaring the camera `texture_external` and `sampler` at [bindGroupIndex](#bindgroupindex). TypeGPU +cannot emit an external-texture binding, so prepend this to the WGSL your shader resolves to. + +*** + +### sampleCamera + +> `readonly` **sampleCamera**: `TgpuFn`\<(`uv`) => `Vec4f`\> + +Defined in: [src/webgpu/cameraShaderBindings.ts:66](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L66) + +The camera sampler as a TypeGPU function — call `sampleCamera(uv)` from your TGSL fragment +shader. Same value as the exported [sampleCamera](../variables/sampleCamera.md). + +*** + +### sampler + +> `readonly` **sampler**: `GPUSampler` + +Defined in: [src/webgpu/cameraShaderBindings.ts:75](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L75) + +The linear-filtering sampler bound at binding 1. diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraTextureResolver.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraTextureResolver.md new file mode 100644 index 00000000..b6758d7f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CameraTextureResolver.md @@ -0,0 +1,58 @@ +# Interface: CameraTextureResolver + +Defined in: [src/webgpu/cameraTextureResolver.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L16) + +An owned `rgba8unorm` texture the camera frame is resolved into each frame — for pipelines that +want a plain `texture_2d` camera instead of `texture_external`. Build once at setup with +[createCameraTextureResolver](../functions/createCameraTextureResolver.md); every field is safe to capture into the frame worklet. + +Prefer sampling the camera directly via [createCameraShaderBindings](../functions/createCameraShaderBindings.md) when you can: the +resolver costs one extra render pass per frame. + +## Properties + +### height + +> `readonly` **height**: `number` + +Defined in: [src/webgpu/cameraTextureResolver.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L22) + +*** + +### resolvePass + +> `readonly` **resolvePass**: [`CameraPassthroughPipeline`](CameraPassthroughPipeline.md) + +Defined in: [src/webgpu/cameraTextureResolver.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L24) + +**`Internal`** + +The pass used to resolve into [texture](#texture). + +*** + +### texture + +> `readonly` **texture**: `GPUTexture` + +Defined in: [src/webgpu/cameraTextureResolver.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L18) + +The resolved camera texture (`rgba8unorm`, sampled + render-attachment usage). + +*** + +### view + +> `readonly` **view**: `GPUTextureView` + +Defined in: [src/webgpu/cameraTextureResolver.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L20) + +A reusable default view of [texture](#texture). + +*** + +### width + +> `readonly` **width**: `number` + +Defined in: [src/webgpu/cameraTextureResolver.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraTextureResolver.ts#L21) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md new file mode 100644 index 00000000..13b8db95 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md @@ -0,0 +1,15 @@ +# Interface: CreateCameraShaderBindingsOptions + +Defined in: [src/webgpu/cameraShaderBindings.ts:50](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L50) + +Options for [createCameraShaderBindings](../functions/createCameraShaderBindings.md). + +## Properties + +### bindGroupIndex? + +> `optional` **bindGroupIndex**: `number` + +Defined in: [src/webgpu/cameraShaderBindings.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L52) + +Bind group index the camera texture + sampler are declared at. Defaults to `0`. diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/FrameCrop.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/FrameCrop.md new file mode 100644 index 00000000..a534dd59 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/FrameCrop.md @@ -0,0 +1,88 @@ +# Interface: FrameCrop + +Defined in: [src/webgpu/cropUtilities.ts:30](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L30) + +A center-crop of a source frame plus a UV-space orientation transform, in source pixels. +Produce one with [computeAspectFillCrop](../functions/computeAspectFillCrop.md) or [computeSquareCrop](../functions/computeSquareCrop.md). + +## Properties + +### cropOriginX + +> **cropOriginX**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:33](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L33) + +*** + +### cropOriginY + +> **cropOriginY**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:34](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L34) + +*** + +### cropSizeX + +> **cropSizeX**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L35) + +*** + +### cropSizeY + +> **cropSizeY**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L36) + +*** + +### sourceHeight + +> **sourceHeight**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L32) + +*** + +### sourceWidth + +> **sourceWidth**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L31) + +*** + +### uv00 + +> **uv00**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L38) + +uvTransform matrix scalars in (m00, m01, m10, m11) order; identity when omitted at compute time. + +*** + +### uv01 + +> **uv01**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:39](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L39) + +*** + +### uv10 + +> **uv10**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:40](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L40) + +*** + +### uv11 + +> **uv11**: `number` + +Defined in: [src/webgpu/cropUtilities.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L41) diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md new file mode 100644 index 00000000..9130c9a7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md @@ -0,0 +1,25 @@ +# Interface: UseCameraWebGpuDeviceResult + +Defined in: [src/webgpu/useCameraWebGpuDevice.ts:49](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/useCameraWebGpuDevice.ts#L49) + +Result of [useCameraWebGpuDevice](../functions/useCameraWebGpuDevice.md). + +## Properties + +### device + +> **device**: `null` \| `GPUDevice` + +Defined in: [src/webgpu/useCameraWebGpuDevice.ts:51](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/useCameraWebGpuDevice.ts#L51) + +The shared GPUDevice; `null` until acquisition resolves. + +*** + +### error + +> **error**: `null` \| `Error` + +Defined in: [src/webgpu/useCameraWebGpuDevice.ts:53](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/useCameraWebGpuDevice.ts#L53) + +Acquisition failure (no adapter, missing platform features), if any. diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/WebGpuFrameRenderContext.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/WebGpuFrameRenderContext.md new file mode 100644 index 00000000..76f43c86 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/interfaces/WebGpuFrameRenderContext.md @@ -0,0 +1,135 @@ +# Interface: WebGpuFrameRenderContext + +Defined in: [src/webgpu/frameRenderContext.ts:8](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L8) + +Everything your render callback needs for one frame. Handed to the function you pass to +`render(...)` inside the source hook's `onFrame` worklet; every field is valid only until that +function returns. + +## Properties + +### cameraBindGroup? + +> `optional` **cameraBindGroup**: `GPUBindGroup` + +Defined in: [src/webgpu/frameRenderContext.ts:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L31) + +Ready-made bind group for [cameraTexture](#cameratexture), present when the hook's +`cameraShaderBindings` option was provided: set it at the bindings' group index and +`sampleCamera(uv)` works. + +*** + +### cameraHeight + +> **cameraHeight**: `number` + +Defined in: [src/webgpu/frameRenderContext.ts:50](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L50) + +*** + +### cameraIsMirrored + +> **cameraIsMirrored**: `boolean` + +Defined in: [src/webgpu/frameRenderContext.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L52) + +Whether the camera feed is mirrored (front cameras usually are). + +*** + +### cameraTexture + +> **cameraTexture**: `GPUExternalTexture` + +Defined in: [src/webgpu/frameRenderContext.ts:25](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L25) + +The live camera frame as a `texture_external`, already rotated upright (and mirrored per the +camera's mirroring). On Android it samples as raw YCbCr — sample it through +`createCameraShaderBindings` (or the ready-made [cameraBindGroup](#camerabindgroup)) for +platform-correct RGB. + +*** + +### cameraWidth + +> **cameraWidth**: `number` + +Defined in: [src/webgpu/frameRenderContext.ts:49](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L49) + +Upright (post-rotation) camera frame size, in pixels — feed it to `computeAspectFillCrop` +together with the output aspect. + +*** + +### commandEncoder + +> **commandEncoder**: `GPUCommandEncoder` + +Defined in: [src/webgpu/frameRenderContext.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L18) + +The command encoder for this frame. Encode your render/compute passes into it — the hook +submits it (a single submit) and delivers the frame after your callback returns. Do not call +`queue.submit` yourself for work targeting [outputTexture](#outputtexture). + +*** + +### device + +> **device**: `GPUDevice` + +Defined in: [src/webgpu/frameRenderContext.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L10) + +The device in use (the shared device, or your override). + +*** + +### outputHeight + +> **outputHeight**: `number` + +Defined in: [src/webgpu/frameRenderContext.ts:44](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L44) + +*** + +### outputTexture + +> **outputTexture**: `GPUTexture` + +Defined in: [src/webgpu/frameRenderContext.ts:33](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L33) + +The output texture your passes draw into; its content becomes the published video frame. + +*** + +### outputView + +> **outputView**: `GPUTextureView` + +Defined in: [src/webgpu/frameRenderContext.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L41) + +A cached, reusable default `createView()` of [outputTexture](#outputtexture). Prefer this over calling +`outputTexture.createView()` yourself every frame: `GPUTextureView` has no `destroy()`/`release()` +in react-native-webgpu, so a per-frame view accumulates native (malloc) wrappers on the frame +runtime until GC — a steady leak in a render loop. The output textures are a small fixed pool, so +the hook builds one view per slot and reuses it. + +*** + +### outputWidth + +> **outputWidth**: `number` + +Defined in: [src/webgpu/frameRenderContext.ts:43](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L43) + +Size of [outputTexture](#outputtexture), in pixels. + +*** + +### queue + +> **queue**: `GPUQueue` + +Defined in: [src/webgpu/frameRenderContext.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L12) + +Shortcut for `device.queue`. diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md new file mode 100644 index 00000000..47ce26a3 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md @@ -0,0 +1,18 @@ +# Type Alias: WebGpuFrameRenderFunction() + +> **WebGpuFrameRenderFunction** = (`encode`) => `void` + +Defined in: [src/webgpu/frameRenderContext.ts:61](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/frameRenderContext.ts#L61) + +The `render` function handed to the source hook's `onFrame` worklet. Call it at most once per +frame with your encode function; skipping it drops the frame (nothing is published for it). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encode` | (`context`) => `void` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuRuntime.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuRuntime.md new file mode 100644 index 00000000..2defec67 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/type-aliases/WebGpuRuntime.md @@ -0,0 +1,7 @@ +# Type Alias: WebGpuRuntime + +> **WebGpuRuntime** = *typeof* `RNWebGPU` + +Defined in: [src/webgpu/webGpuRuntime.ts:4](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/webGpuRuntime.ts#L4) + +The react-native-webgpu runtime singleton (the `RNWebGPU` JSI global). diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/FrameCropParams.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/FrameCropParams.md new file mode 100644 index 00000000..9fbc32e3 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/FrameCropParams.md @@ -0,0 +1,11 @@ +# Variable: FrameCropParams + +> `const` **FrameCropParams**: `WgslStruct`\<\{ `cropOrigin`: `Vec2f`; `cropSize`: `Vec2f`; `sourceSize`: `Vec2u`; `uvTransform`: `Mat2x2f`; \}\> + +Defined in: [src/webgpu/cropUtilities.ts:17](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cropUtilities.ts#L17) + +The TypeGPU schema for the crop uniform. This is the single source of truth for both the WGSL +`struct FrameCropParams` (emitted when the passthrough shader is resolved) and the byte layout +[packFrameCropParams](../functions/packFrameCropParams.md) writes. Its std140 layout is 40 bytes: + + sourceSize: vec2u @0 cropOrigin: vec2f @8 cropSize: vec2f @16 uvTransform: mat2x2f @24 diff --git a/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/sampleCamera.md b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/sampleCamera.md new file mode 100644 index 00000000..f12fd8d8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/custom-video-source/webgpu/variables/sampleCamera.md @@ -0,0 +1,10 @@ +# Variable: sampleCamera + +> `const` **sampleCamera**: `TgpuFn`\<(`uv`) => `d.Vec4f`\> + +Defined in: [src/webgpu/cameraShaderBindings.ts:42](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-custom-video-source/src/webgpu/cameraShaderBindings.ts#L42) + +Samples the live camera and returns upright RGB on both platforms (the Android in-shader BT.709 +YUV decode is included automatically). A TypeGPU function you can call from your own TGSL +fragment shaders. It reads the camera texture + sampler declared by +[CameraShaderBindings.bindingDeclarations](../interfaces/CameraShaderBindings.md#bindingdeclarations), which you must prepend to the resolved shader. diff --git a/versioned_docs/version-0.29.0/api/mobile/classes/MediaStream.md b/versioned_docs/version-0.29.0/api/mobile/classes/MediaStream.md new file mode 100644 index 00000000..0375e609 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/classes/MediaStream.md @@ -0,0 +1,290 @@ +# Class: MediaStream + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:8 + +## Extends + +- `unknown`\<`MediaStreamEventMap`\> + +## Constructors + +### Constructor + +> **new MediaStream**(`arg?`): `MediaStream` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:31 + +A MediaStream can be constructed in several ways, depending on the parameters +that are passed here. + +- undefined: just a new stream, with no tracks. +- MediaStream instance: a new stream, with a copy of the tracks of the passed stream. +- Array of MediaStreamTrack: a new stream with a copy of the tracks in the array. +- object: a new stream instance, represented by the passed info object, this is always + done internally, when the stream is first created in native and the JS wrapper is + built afterwards. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `arg?` | `MediaStream` \| [`MediaStreamTrack`](MediaStreamTrack.md)[] \| \{ `streamId`: `string`; `streamReactTag`: `string`; `tracks`: `MediaStreamTrackInfo`[]; \} | + +#### Returns + +`MediaStream` + +#### Overrides + +`EventTarget.constructor` + +## Properties + +### \_id + +> **\_id**: `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:10 + +*** + +### \_reactTag + +> **\_reactTag**: `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:19 + +The identifier of this MediaStream unique within the associated +WebRTCModule instance. As the id of a remote MediaStream instance is unique +only within the associated RTCPeerConnection, it is not sufficiently unique +to identify this MediaStream across multiple RTCPeerConnections and to +unambiguously differentiate it from a local MediaStream instance not added +to an RTCPeerConnection. + +*** + +### \_tracks + +> **\_tracks**: [`MediaStreamTrack`](MediaStreamTrack.md)[] + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:9 + +## Accessors + +### active + +#### Get Signature + +> **get** **active**(): `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:41 + +##### Returns + +`boolean` + +*** + +### id + +#### Get Signature + +> **get** **id**(): `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:40 + +##### Returns + +`string` + +*** + +### onaddtrack + +#### Get Signature + +> **get** **onaddtrack**(): `any` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:36 + +##### Returns + +`any` + +#### Set Signature + +> **set** **onaddtrack**(`value`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:37 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `any` | + +##### Returns + +`void` + +*** + +### onremovetrack + +#### Get Signature + +> **get** **onremovetrack**(): `any` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:38 + +##### Returns + +`any` + +#### Set Signature + +> **set** **onremovetrack**(`value`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:39 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `any` | + +##### Returns + +`void` + +## Methods + +### addTrack() + +> **addTrack**(`track`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:42 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `track` | [`MediaStreamTrack`](MediaStreamTrack.md) | + +#### Returns + +`void` + +*** + +### clone() + +> **clone**(): `never` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:48 + +#### Returns + +`never` + +*** + +### getAudioTracks() + +> **getAudioTracks**(): [`MediaStreamTrack`](MediaStreamTrack.md)[] + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:46 + +#### Returns + +[`MediaStreamTrack`](MediaStreamTrack.md)[] + +*** + +### getTrackById() + +> **getTrackById**(`trackId`): `undefined` \| [`MediaStreamTrack`](MediaStreamTrack.md) + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:45 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `trackId` | `any` | + +#### Returns + +`undefined` \| [`MediaStreamTrack`](MediaStreamTrack.md) + +*** + +### getTracks() + +> **getTracks**(): [`MediaStreamTrack`](MediaStreamTrack.md)[] + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:44 + +#### Returns + +[`MediaStreamTrack`](MediaStreamTrack.md)[] + +*** + +### getVideoTracks() + +> **getVideoTracks**(): [`MediaStreamTrack`](MediaStreamTrack.md)[] + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:47 + +#### Returns + +[`MediaStreamTrack`](MediaStreamTrack.md)[] + +*** + +### release() + +> **release**(`releaseTracks?`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:50 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `releaseTracks?` | `boolean` | + +#### Returns + +`void` + +*** + +### removeTrack() + +> **removeTrack**(`track`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:43 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `track` | [`MediaStreamTrack`](MediaStreamTrack.md) | + +#### Returns + +`void` + +*** + +### toURL() + +> **toURL**(): `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStream.d.ts:49 + +#### Returns + +`string` diff --git a/versioned_docs/version-0.29.0/api/mobile/classes/MediaStreamTrack.md b/versioned_docs/version-0.29.0/api/mobile/classes/MediaStreamTrack.md new file mode 100644 index 00000000..d630a509 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/classes/MediaStreamTrack.md @@ -0,0 +1,460 @@ +# Class: MediaStreamTrack + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:27 + +## Extends + +- `unknown`\<`MediaStreamTrackEventMap`\> + +## Constructors + +### Constructor + +> **new MediaStreamTrack**(`info`): `MediaStreamTrack` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:38 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | `MediaStreamTrackInfo` | + +#### Returns + +`MediaStreamTrack` + +#### Overrides + +`EventTarget.constructor` + +## Properties + +### \_constraints + +> **\_constraints**: `MediaTrackConstraints` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:28 + +*** + +### \_enabled + +> **\_enabled**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:29 + +*** + +### \_muted + +> **\_muted**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:31 + +*** + +### \_peerConnectionId + +> **\_peerConnectionId**: `number` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:32 + +*** + +### \_readyState + +> **\_readyState**: `MediaStreamTrackState` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:33 + +*** + +### \_settings + +> **\_settings**: `MediaTrackSettings` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:30 + +*** + +### id + +> `readonly` **id**: `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:34 + +*** + +### kind + +> `readonly` **kind**: `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:35 + +*** + +### label + +> `readonly` **label**: `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:36 + +*** + +### remote + +> `readonly` **remote**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:37 + +## Accessors + +### enabled + +#### Get Signature + +> **get** **enabled**(): `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:45 + +##### Returns + +`boolean` + +#### Set Signature + +> **set** **enabled**(`enabled`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:46 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `enabled` | `boolean` | + +##### Returns + +`void` + +*** + +### muted + +#### Get Signature + +> **get** **muted**(): `boolean` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:47 + +##### Returns + +`boolean` + +*** + +### onended + +#### Get Signature + +> **get** **onended**(): `any` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:39 + +##### Returns + +`any` + +#### Set Signature + +> **set** **onended**(`value`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:40 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `any` | + +##### Returns + +`void` + +*** + +### onmute + +#### Get Signature + +> **get** **onmute**(): `any` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:41 + +##### Returns + +`any` + +#### Set Signature + +> **set** **onmute**(`value`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:42 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `any` | + +##### Returns + +`void` + +*** + +### onunmute + +#### Get Signature + +> **get** **onunmute**(): `any` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:43 + +##### Returns + +`any` + +#### Set Signature + +> **set** **onunmute**(`value`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:44 + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `any` | + +##### Returns + +`void` + +*** + +### readyState + +#### Get Signature + +> **get** **readyState**(): `string` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:48 + +##### Returns + +`string` + +## Methods + +### \_registerEvents() + +> **\_registerEvents**(): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:90 + +#### Returns + +`void` + +*** + +### \_setMutedInternal() + +> **\_setMutedInternal**(`muted`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:68 + +Internal function which is used to set the muted state on remote tracks and +emit the mute / unmute event. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `muted` | `boolean` | Whether the track should be marked as muted / unmuted. | + +#### Returns + +`void` + +*** + +### \_setVideoEffect() + +> **\_setVideoEffect**(`name`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:61 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `string` | + +#### Returns + +`void` + +*** + +### \_setVideoEffects() + +> **\_setVideoEffects**(`names`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:60 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `names` | `string`[] | + +#### Returns + +`void` + +*** + +### \_setVolume() + +> **\_setVolume**(`volume`): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:74 + +Custom API for setting the volume on an individual audio track. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `volume` | `number` | a gain value in the range of 0-10. defaults to 1.0 | + +#### Returns + +`void` + +*** + +### ~~\_switchCamera()~~ + +> **\_switchCamera**(): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:59 + +Private / custom API for switching the cameras on the fly, without the +need for adding / removing tracks or doing any SDP renegotiation. + +This is how the reference application (AppRTCMobile) implements camera +switching. + +#### Returns + +`void` + +#### Deprecated + +Use applyConstraints instead. + +*** + +### applyConstraints() + +> **applyConstraints**(`constraints?`): `Promise`\<`void`\> + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:85 + +Applies a new set of constraints to the track. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `constraints?` | `MediaTrackConstraints` | An object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints. If this parameter is omitted, all currently set custom constraints are cleared. | + +#### Returns + +`Promise`\<`void`\> + +*** + +### clone() + +> **clone**(): `never` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:86 + +#### Returns + +`never` + +*** + +### getCapabilities() + +> **getCapabilities**(): `never` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:87 + +#### Returns + +`never` + +*** + +### getConstraints() + +> **getConstraints**(): `MediaTrackConstraints` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:88 + +#### Returns + +`MediaTrackConstraints` + +*** + +### getSettings() + +> **getSettings**(): `MediaTrackSettings` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:89 + +#### Returns + +`MediaTrackSettings` + +*** + +### release() + +> **release**(): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:91 + +#### Returns + +`void` + +*** + +### stop() + +> **stop**(): `void` + +Defined in: react-native-webrtc/lib/typescript/MediaStreamTrack.d.ts:49 + +#### Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/enumerations/AudioDeviceType.md b/versioned_docs/version-0.29.0/api/mobile/enumerations/AudioDeviceType.md new file mode 100644 index 00000000..b97709ea --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/enumerations/AudioDeviceType.md @@ -0,0 +1,93 @@ +# Enumeration: AudioDeviceType + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:2 + +Normalized audio device categories across iOS and Android. + +## Enumeration Members + +### airplay + +> **airplay**: `"airplay"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:9 + +*** + +### bluetooth + +> **bluetooth**: `"bluetooth"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:5 + +*** + +### carAudio + +> **carAudio**: `"carAudio"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:10 + +*** + +### earpiece + +> **earpiece**: `"earpiece"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:3 + +*** + +### hdmi + +> **hdmi**: `"hdmi"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:8 + +*** + +### hearingAid + +> **hearingAid**: `"hearingAid"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:11 + +*** + +### lineOut + +> **lineOut**: `"lineOut"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:12 + +*** + +### speaker + +> **speaker**: `"speaker"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:4 + +*** + +### unknown + +> **unknown**: `"unknown"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:13 + +*** + +### usb + +> **usb**: `"usb"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:7 + +*** + +### wiredHeadset + +> **wiredHeadset**: `"wiredHeadset"` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:6 diff --git a/versioned_docs/version-0.26.0/api/web/enumerations/Variant.md b/versioned_docs/version-0.29.0/api/mobile/enumerations/Variant.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/enumerations/Variant.md rename to versioned_docs/version-0.29.0/api/mobile/enumerations/Variant.md diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/FishjamProvider.md b/versioned_docs/version-0.29.0/api/mobile/functions/FishjamProvider.md similarity index 62% rename from versioned_docs/version-0.26.0/api/mobile/functions/FishjamProvider.md rename to versioned_docs/version-0.29.0/api/mobile/functions/FishjamProvider.md index c9550f31..1d171720 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/FishjamProvider.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/FishjamProvider.md @@ -2,7 +2,7 @@ > **FishjamProvider**(`props`): `FunctionComponentElement`\<`FishjamProviderProps`\> -Defined in: [packages/mobile-client/src/index.ts:118](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/index.ts#L118) +Defined in: [mobile-client/src/index.ts:127](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/index.ts#L127) ## Parameters diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/RTCPIPView.md b/versioned_docs/version-0.29.0/api/mobile/functions/RTCPIPView.md similarity index 52% rename from versioned_docs/version-0.26.0/api/mobile/functions/RTCPIPView.md rename to versioned_docs/version-0.29.0/api/mobile/functions/RTCPIPView.md index b517f727..a23787d7 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/RTCPIPView.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/RTCPIPView.md @@ -2,7 +2,7 @@ > **RTCPIPView**(`__namedParameters`): `Element` -Defined in: [packages/mobile-client/src/overrides/RTCView.tsx:31](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/RTCView.tsx#L31) +Defined in: [mobile-client/src/overrides/RTCView.tsx:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/RTCView.tsx#L31) ## Parameters diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/RTCView.md b/versioned_docs/version-0.29.0/api/mobile/functions/RTCView.md similarity index 52% rename from versioned_docs/version-0.26.0/api/mobile/functions/RTCView.md rename to versioned_docs/version-0.29.0/api/mobile/functions/RTCView.md index 2324557e..4b08359c 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/RTCView.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/RTCView.md @@ -2,7 +2,7 @@ > **RTCView**(`__namedParameters`): `Element` -Defined in: [packages/mobile-client/src/overrides/RTCView.tsx:26](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/RTCView.tsx#L26) +Defined in: [mobile-client/src/overrides/RTCView.tsx:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/RTCView.tsx#L26) ## Parameters diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/pushAudioSamples.md b/versioned_docs/version-0.29.0/api/mobile/functions/pushAudioSamples.md new file mode 100644 index 00000000..8ebd6038 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/pushAudioSamples.md @@ -0,0 +1,27 @@ +# Function: pushAudioSamples() + +> **pushAudioSamples**(`track`, `samples`): `void` + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:91 + +Hand PCM to a custom audio track. + +Call whenever your source produces audio, with any chunk size — the native +layer re-frames and paces it. `Float32Array` samples are expected in +`[-1, 1]` (values outside are clamped); `Int16Array` is taken as-is. Stereo +tracks take interleaved samples in whole frames — a push with an odd sample +count has its trailing sample dropped to keep the channels aligned. +Worklet-safe: it dispatches synchronously to +native on whatever thread you call it from. The samples are copied before the +call returns, so the array may be reused immediately. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `track` | [`CustomAudioTrack`](../interfaces/CustomAudioTrack.md) | +| `samples` | `Float32Array`\<`ArrayBufferLike`\> \| `Int16Array`\<`ArrayBufferLike`\> | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/startPIP.md b/versioned_docs/version-0.29.0/api/mobile/functions/startPIP.md new file mode 100644 index 00000000..6b10f3d2 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/startPIP.md @@ -0,0 +1,15 @@ +# Function: startPIP() + +> **startPIP**(`ref`): `void` + +Defined in: react-native-webrtc/lib/typescript/RTCPIPView.d.ts:14 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `ref` | `RefObject`\<`Component`\<`RTCVideoViewProps`, \{ \}, `any`\> & `NativeMethods`\> | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/stopPIP.md b/versioned_docs/version-0.29.0/api/mobile/functions/stopPIP.md new file mode 100644 index 00000000..403fb4e6 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/stopPIP.md @@ -0,0 +1,15 @@ +# Function: stopPIP() + +> **stopPIP**(`ref`): `void` + +Defined in: react-native-webrtc/lib/typescript/RTCPIPView.d.ts:15 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `ref` | `RefObject`\<`Component`\<`RTCVideoViewProps`, \{ \}, `any`\> & `NativeMethods`\> | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useAudioOutput.md b/versioned_docs/version-0.29.0/api/mobile/functions/useAudioOutput.md new file mode 100644 index 00000000..4b63b209 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useAudioOutput.md @@ -0,0 +1,13 @@ +# Function: useAudioOutput() + +> **useAudioOutput**(): [`UseAudioOutputResult`](../type-aliases/UseAudioOutputResult.md) + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:17 + +Audio output state for the current session. + +Use `.ios` / `.android` for platform-specific actions. + +## Returns + +[`UseAudioOutputResult`](../type-aliases/UseAudioOutputResult.md) diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useCallKit.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKit.md new file mode 100644 index 00000000..09589fe7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKit.md @@ -0,0 +1,39 @@ +# Function: useCallKit() + +> **useCallKit**(): `object` + +Defined in: [mobile-client/src/overrides/hooks.ts:134](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L134) + +## Returns + +`object` + +### endCallKitSession() + +> **endCallKitSession**: () => `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +### getCallKitSessionStatus() + +> **getCallKitSessionStatus**: () => `Promise`\<`boolean`\> + +#### Returns + +`Promise`\<`boolean`\> + +### startCallKitSession() + +> **startCallKitSession**: (`config`) => `Promise`\<`void`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`CallKitConfig`](../type-aliases/CallKitConfig.md) | + +#### Returns + +`Promise`\<`void`\> diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitEvent.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitEvent.md new file mode 100644 index 00000000..8803fe5f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitEvent.md @@ -0,0 +1,22 @@ +# Function: useCallKitEvent() + +> **useCallKitEvent**\<`T`\>(`action`, `callback`): `void` + +Defined in: [mobile-client/src/overrides/hooks.ts:143](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L143) + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` *extends* keyof [`CallKitAction`](../type-aliases/CallKitAction.md) | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `action` | `T` | +| `callback` | (`event`) => `void` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitService.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitService.md new file mode 100644 index 00000000..eedd8bc1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCallKitService.md @@ -0,0 +1,15 @@ +# Function: useCallKitService() + +> **useCallKitService**(`config`): `void` + +Defined in: [mobile-client/src/overrides/hooks.ts:139](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L139) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`CallKitConfig`](../type-aliases/CallKitConfig.md) | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useCamera.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCamera.md new file mode 100644 index 00000000..e2bfc2a5 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCamera.md @@ -0,0 +1,9 @@ +# Function: useCamera() + +> **useCamera**(): [`UseCameraResult`](../type-aliases/UseCameraResult.md) + +Defined in: [mobile-client/src/overrides/hooks.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L36) + +## Returns + +[`UseCameraResult`](../type-aliases/UseCameraResult.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCameraPermissions.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCameraPermissions.md similarity index 81% rename from versioned_docs/version-0.26.0/api/mobile/functions/useCameraPermissions.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useCameraPermissions.md index 193752b2..9a7c05ac 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCameraPermissions.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCameraPermissions.md @@ -2,7 +2,7 @@ > **useCameraPermissions**(): \[() => `Promise`\<[`PermissionStatus`](../type-aliases/PermissionStatus.md)\>, () => `Promise`\<[`PermissionStatus`](../type-aliases/PermissionStatus.md)\>\] -Defined in: [packages/mobile-client/src/hooks/usePermissions.ts:47](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/hooks/usePermissions.ts#L47) +Defined in: [mobile-client/src/hooks/usePermissions.ts:47](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/usePermissions.ts#L47) Hook for querying and requesting camera permission on the device. diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useConnection.md b/versioned_docs/version-0.29.0/api/mobile/functions/useConnection.md similarity index 93% rename from versioned_docs/version-0.26.0/api/mobile/functions/useConnection.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useConnection.md index 0d2b4d8f..c776f7df 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useConnection.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useConnection.md @@ -2,7 +2,7 @@ > **useConnection**(): `object` -Defined in: packages/react-client/dist/hooks/useConnection.d.ts:17 +Defined in: react-client/dist/hooks/useConnection.d.ts:17 Hook allows to join or leave a room and check the current connection status. diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useCustomAudioSource.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCustomAudioSource.md new file mode 100644 index 00000000..20da75aa --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCustomAudioSource.md @@ -0,0 +1,45 @@ +# Function: useCustomAudioSource() + +> **useCustomAudioSource**(`options?`): [`UseCustomAudioSourceResult`](../interfaces/UseCustomAudioSourceResult.md) + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:129](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L129) + +Publish your own audio to Fishjam. + +Creates a custom audio track, publishes it, and cleans it up — you supply +the PCM from any source (a synthesizer, a decoder, an audio pipeline) via +`pushAudioSamples`. The published track behaves like a live microphone: +pauses in pushing are fine and play as silence. It is independent of +[useMicrophone](useMicrophone.md) and does not involve the device microphone in any way — +publishing it does not trigger the recording permission. + +Remote peers receive the track with metadata type `"customAudio"` +(`usePeers` exposes it under `customAudioTracks`). + +Push PCM with `pushAudioSamples` (from `@fishjam-cloud/react-native-client`) +and the returned [track](../interfaces/UseCustomAudioSourceResult.md#track) handle — +from the JS thread or from inside a worklet, with any chunk size. The track +re-paces pushes into a continuous stream, filling gaps with silence like a +live microphone. `Float32Array` samples are expected in `[-1, 1]`; +`Int16Array` is taken as-is. + +```tsx +const { startStreaming, stopStreaming, track } = useCustomAudioSource(); + +// e.g. from react-native-audio-api's AudioRecorder: +recorder.onAudioReady({ sampleRate: 48000, bufferLength: 4800, channelCount: 1 }, + ({ buffer }) => track && pushAudioSamples(track, buffer.getChannelData(0))); +``` + +Requires the New Architecture; `startStreaming` reports an error on the old +architecture. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `options?` | [`UseCustomAudioSourceOptions`](../interfaces/UseCustomAudioSourceOptions.md) | + +## Returns + +[`UseCustomAudioSourceResult`](../interfaces/UseCustomAudioSourceResult.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useCustomSource.md b/versioned_docs/version-0.29.0/api/mobile/functions/useCustomSource.md similarity index 56% rename from versioned_docs/version-0.26.0/api/mobile/functions/useCustomSource.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useCustomSource.md index d0e50312..c284b334 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useCustomSource.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useCustomSource.md @@ -2,7 +2,7 @@ > **useCustomSource**\<`T`\>(`sourceId`): `object` -Defined in: [packages/mobile-client/src/overrides/hooks.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L52) +Defined in: [mobile-client/src/overrides/hooks.ts:86](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L86) ## Type Parameters @@ -28,7 +28,7 @@ Defined in: [packages/mobile-client/src/overrides/hooks.ts:52](https://github.co | Parameter | Type | | ------ | ------ | -| `newStream` | `null` \| `MediaStream` | +| `newStream` | `null` \| [`MediaStream`](../classes/MediaStream.md) | #### Returns @@ -36,4 +36,4 @@ Defined in: [packages/mobile-client/src/overrides/hooks.ts:52](https://github.co ### stream -> **stream**: `undefined` \| `MediaStream` +> **stream**: `undefined` \| [`MediaStream`](../classes/MediaStream.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useDataChannel.md b/versioned_docs/version-0.29.0/api/mobile/functions/useDataChannel.md similarity index 79% rename from versioned_docs/version-0.26.0/api/mobile/functions/useDataChannel.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useDataChannel.md index d709ded8..40bbb206 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useDataChannel.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useDataChannel.md @@ -2,7 +2,7 @@ > **useDataChannel**(): [`UseDataChannelResult`](../type-aliases/UseDataChannelResult.md) -Defined in: packages/react-client/dist/hooks/useDataChannel.d.ts:8 +Defined in: react-client/dist/hooks/useDataChannel.d.ts:8 Hook for data channel operations - publish and subscribe to data. diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useInitializeDevices.md b/versioned_docs/version-0.29.0/api/mobile/functions/useInitializeDevices.md similarity index 70% rename from versioned_docs/version-0.26.0/api/mobile/functions/useInitializeDevices.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useInitializeDevices.md index 436b9711..0f4e1ece 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useInitializeDevices.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useInitializeDevices.md @@ -2,7 +2,7 @@ > **useInitializeDevices**(): `object` -Defined in: [packages/mobile-client/src/overrides/hooks.ts:83](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L83) +Defined in: [mobile-client/src/overrides/hooks.ts:117](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L117) ## Returns diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamStreamer.md b/versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamStreamer.md similarity index 53% rename from versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamStreamer.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamStreamer.md index facecbea..05ab6007 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamStreamer.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamStreamer.md @@ -2,7 +2,7 @@ > **useLivestreamStreamer**(): [`UseLivestreamStreamerResult`](../type-aliases/UseLivestreamStreamerResult.md) -Defined in: [packages/mobile-client/src/overrides/hooks.ts:61](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L61) +Defined in: [mobile-client/src/overrides/hooks.ts:95](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L95) ## Returns diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamViewer.md b/versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamViewer.md similarity index 52% rename from versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamViewer.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamViewer.md index 531d4a94..e2160ac5 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useLivestreamViewer.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useLivestreamViewer.md @@ -2,7 +2,7 @@ > **useLivestreamViewer**(): [`UseLivestreamViewerResult`](../type-aliases/UseLivestreamViewerResult.md) -Defined in: [packages/mobile-client/src/overrides/hooks.ts:75](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L75) +Defined in: [mobile-client/src/overrides/hooks.ts:109](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L109) ## Returns diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useMicrophone.md b/versioned_docs/version-0.29.0/api/mobile/functions/useMicrophone.md new file mode 100644 index 00000000..b5d29951 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useMicrophone.md @@ -0,0 +1,9 @@ +# Function: useMicrophone() + +> **useMicrophone**(): [`UseMicrophoneResult`](../type-aliases/UseMicrophoneResult.md) + +Defined in: [mobile-client/src/overrides/hooks.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L52) + +## Returns + +[`UseMicrophoneResult`](../type-aliases/UseMicrophoneResult.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/useMicrophonePermissions.md b/versioned_docs/version-0.29.0/api/mobile/functions/useMicrophonePermissions.md similarity index 81% rename from versioned_docs/version-0.26.0/api/mobile/functions/useMicrophonePermissions.md rename to versioned_docs/version-0.29.0/api/mobile/functions/useMicrophonePermissions.md index 07a67394..5659fd5d 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/useMicrophonePermissions.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useMicrophonePermissions.md @@ -2,7 +2,7 @@ > **useMicrophonePermissions**(): \[() => `Promise`\<[`PermissionStatus`](../type-aliases/PermissionStatus.md)\>, () => `Promise`\<[`PermissionStatus`](../type-aliases/PermissionStatus.md)\>\] -Defined in: [packages/mobile-client/src/hooks/usePermissions.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/hooks/usePermissions.ts#L70) +Defined in: [mobile-client/src/hooks/usePermissions.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/usePermissions.ts#L70) Hook for querying and requesting microphone permission on the device. diff --git a/versioned_docs/version-0.26.0/api/mobile/functions/usePeers.md b/versioned_docs/version-0.29.0/api/mobile/functions/usePeers.md similarity index 75% rename from versioned_docs/version-0.26.0/api/mobile/functions/usePeers.md rename to versioned_docs/version-0.29.0/api/mobile/functions/usePeers.md index e7e87a2d..2533f0a3 100644 --- a/versioned_docs/version-0.26.0/api/mobile/functions/usePeers.md +++ b/versioned_docs/version-0.29.0/api/mobile/functions/usePeers.md @@ -2,7 +2,7 @@ > **usePeers**\<`P`, `S`\>(): `object` -Defined in: [packages/mobile-client/src/overrides/hooks.ts:92](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/hooks.ts#L92) +Defined in: [mobile-client/src/overrides/hooks.ts:126](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L126) ## Type Parameters diff --git a/versioned_docs/version-0.29.0/api/mobile/functions/useScreenShare.md b/versioned_docs/version-0.29.0/api/mobile/functions/useScreenShare.md new file mode 100644 index 00000000..f80c8825 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/functions/useScreenShare.md @@ -0,0 +1,9 @@ +# Function: useScreenShare() + +> **useScreenShare**(): [`UseScreenShareResult`](../type-aliases/UseScreenShareResult.md) + +Defined in: [mobile-client/src/overrides/hooks.ts:68](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/hooks.ts#L68) + +## Returns + +[`UseScreenShareResult`](../type-aliases/UseScreenShareResult.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/index.md b/versioned_docs/version-0.29.0/api/mobile/index.md similarity index 81% rename from versioned_docs/version-0.26.0/api/mobile/index.md rename to versioned_docs/version-0.29.0/api/mobile/index.md index de8312a0..b9dfc778 100644 --- a/versioned_docs/version-0.26.0/api/mobile/index.md +++ b/versioned_docs/version-0.29.0/api/mobile/index.md @@ -13,13 +13,18 @@ React Native client SDK for building mobile video and audio apps with Fishjam. ## Other - [FishjamProvider](functions/FishjamProvider.md) +- [pushAudioSamples](functions/pushAudioSamples.md) - [RTCPIPView](functions/RTCPIPView.md) - [RTCView](functions/RTCView.md) +- [startPIP](functions/startPIP.md) +- [stopPIP](functions/stopPIP.md) +- [useAudioOutput](functions/useAudioOutput.md) - [useCallKit](functions/useCallKit.md) - [useCallKitEvent](functions/useCallKitEvent.md) - [useCallKitService](functions/useCallKitService.md) - [useCamera](functions/useCamera.md) - [useCameraPermissions](functions/useCameraPermissions.md) +- [useCustomAudioSource](functions/useCustomAudioSource.md) - [useCustomSource](functions/useCustomSource.md) - [useInitializeDevices](functions/useInitializeDevices.md) - [useLivestreamStreamer](functions/useLivestreamStreamer.md) @@ -28,13 +33,24 @@ React Native client SDK for building mobile video and audio apps with Fishjam. - [useMicrophonePermissions](functions/useMicrophonePermissions.md) - [usePeers](functions/usePeers.md) - [useScreenShare](functions/useScreenShare.md) +- [AudioDeviceType](enumerations/AudioDeviceType.md) - [Variant](enumerations/Variant.md) +- [MediaStream](classes/MediaStream.md) +- [MediaStreamTrack](classes/MediaStreamTrack.md) +- [CustomAudioSink](interfaces/CustomAudioSink.md) +- [CustomAudioTrack](interfaces/CustomAudioTrack.md) - [DataChannelOptions](interfaces/DataChannelOptions.md) - [JoinRoomConfig](interfaces/JoinRoomConfig.md) - [SimulcastConfig](interfaces/SimulcastConfig.md) +- [UseCustomAudioSourceOptions](interfaces/UseCustomAudioSourceOptions.md) +- [UseCustomAudioSourceResult](interfaces/UseCustomAudioSourceResult.md) +- [AudioDevice](type-aliases/AudioDevice.md) +- [AudioOutputChangedInfo](type-aliases/AudioOutputChangedInfo.md) - [AuthErrorReason](type-aliases/AuthErrorReason.md) - [BandwidthLimits](type-aliases/BandwidthLimits.md) - [Brand](type-aliases/Brand.md) +- [CallKitAction](type-aliases/CallKitAction.md) +- [CallKitConfig](type-aliases/CallKitConfig.md) - [ConnectStreamerConfig](type-aliases/ConnectStreamerConfig.md) - [ConnectViewerConfig](type-aliases/ConnectViewerConfig.md) - [CustomSource](type-aliases/CustomSource.md) @@ -70,6 +86,7 @@ React Native client SDK for building mobile video and audio apps with Fishjam. - [TrackMiddleware](type-aliases/TrackMiddleware.md) - [TracksMiddleware](type-aliases/TracksMiddleware.md) - [TracksMiddlewareResult](type-aliases/TracksMiddlewareResult.md) +- [UseAudioOutputResult](type-aliases/UseAudioOutputResult.md) - [UseCameraResult](type-aliases/UseCameraResult.md) - [UseCustomSourceResult](type-aliases/UseCustomSourceResult.md) - [UseDataChannelResult](type-aliases/UseDataChannelResult.md) @@ -80,6 +97,7 @@ React Native client SDK for building mobile video and audio apps with Fishjam. - [UseMicrophoneResult](type-aliases/UseMicrophoneResult.md) - [UseSandboxProps](type-aliases/UseSandboxProps.md) - [UseScreenShareResult](type-aliases/UseScreenShareResult.md) +- [ScreenCapturePickerView](variables/ScreenCapturePickerView.md) - [SimulcastConfig](variables/SimulcastConfig.md) - [useForegroundService](variables/useForegroundService.md) - [useSandbox](variables/useSandbox.md) diff --git a/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioSink.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioSink.md new file mode 100644 index 00000000..037dc36e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioSink.md @@ -0,0 +1,33 @@ +# Interface: CustomAudioSink + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:39 + +The native per-track push channel handed back on a track handle's `sink`. + +Backed by a JSI host object, so it is shared *by reference* into a worklet — +calling `push` there dispatches synchronously on the worklet thread with no +hop. You normally don't call this directly; use [pushAudioSamples](../functions/pushAudioSamples.md). + +Push from the *same* worklet runtime the sink was captured into: `push` binds +lazily to whichever runtime first resolves it. Each access to `sink.push` +returns a fresh (functionally identical) function, so a hot loop should hoist +it once (`const push = track.sink.push`) and reuse it, which also skips a +small per-access allocation. + +## Methods + +### push() + +> **push**(`samples`): `void` + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:40 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `samples` | `Float32Array`\<`ArrayBufferLike`\> \| `Int16Array`\<`ArrayBufferLike`\> | + +#### Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioTrack.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioTrack.md new file mode 100644 index 00000000..b95b1375 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/interfaces/CustomAudioTrack.md @@ -0,0 +1,47 @@ +# Interface: CustomAudioTrack + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:47 + +Handle for a custom audio track. Plain and worklet-serializable — store it +(not the [MediaStream](../classes/MediaStream.md)) in the ref/shared value your audio-producing +code reads, and pass it to [pushAudioSamples](../functions/pushAudioSamples.md). + +## Properties + +### channelCount + +> `readonly` **channelCount**: `1` \| `2` + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:53 + +The channel count this track was created with. + +*** + +### sampleRateHz + +> `readonly` **sampleRateHz**: `number` + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:51 + +The sample rate this track was created with. + +*** + +### sink + +> `readonly` **sink**: [`CustomAudioSink`](CustomAudioSink.md) + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:55 + +Native push channel; use [pushAudioSamples](../functions/pushAudioSamples.md) rather than calling it directly. + +*** + +### trackId + +> `readonly` **trackId**: `string` + +Defined in: react-native-webrtc/lib/typescript/createCustomAudioTrack.d.ts:49 + +Id of the underlying audio track. diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/DataChannelOptions.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/DataChannelOptions.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/interfaces/DataChannelOptions.md rename to versioned_docs/version-0.29.0/api/mobile/interfaces/DataChannelOptions.md diff --git a/versioned_docs/version-0.26.0/api/mobile/interfaces/JoinRoomConfig.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/JoinRoomConfig.md similarity index 69% rename from versioned_docs/version-0.26.0/api/mobile/interfaces/JoinRoomConfig.md rename to versioned_docs/version-0.29.0/api/mobile/interfaces/JoinRoomConfig.md index 230755f8..60967ad1 100644 --- a/versioned_docs/version-0.26.0/api/mobile/interfaces/JoinRoomConfig.md +++ b/versioned_docs/version-0.29.0/api/mobile/interfaces/JoinRoomConfig.md @@ -1,6 +1,6 @@ # Interface: JoinRoomConfig\ -Defined in: packages/react-client/dist/hooks/useConnection.d.ts:2 +Defined in: react-client/dist/hooks/useConnection.d.ts:2 ## Type Parameters @@ -14,7 +14,7 @@ Defined in: packages/react-client/dist/hooks/useConnection.d.ts:2 > `optional` **peerMetadata**: `PeerMetadata` -Defined in: packages/react-client/dist/hooks/useConnection.d.ts:10 +Defined in: react-client/dist/hooks/useConnection.d.ts:10 String indexed record with metadata, that will be available to all other peers @@ -24,6 +24,6 @@ String indexed record with metadata, that will be available to all other peers > **peerToken**: `string` -Defined in: packages/react-client/dist/hooks/useConnection.d.ts:6 +Defined in: react-client/dist/hooks/useConnection.d.ts:6 Token received from server (or Room Manager) diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/SimulcastConfig.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/SimulcastConfig.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/interfaces/SimulcastConfig.md rename to versioned_docs/version-0.29.0/api/mobile/interfaces/SimulcastConfig.md diff --git a/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceOptions.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceOptions.md new file mode 100644 index 00000000..9ba8e398 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceOptions.md @@ -0,0 +1,55 @@ +# Interface: UseCustomAudioSourceOptions + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L20) + +Settings for [useCustomAudioSource](../functions/useCustomAudioSource.md), fixed for the lifetime of a +streaming session (a `startStreaming`/`stopStreaming` pair). + +## Properties + +### channelCount? + +> `optional` **channelCount**: `1` \| `2` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:37](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L37) + +`1` for mono or `2` for interleaved stereo. Defaults to `1`. + +*** + +### maxBufferedDurationMs? + +> `optional` **maxBufferedDurationMs**: `number` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:45](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L45) + +How much pushed-but-not-yet-sent audio to hold, in milliseconds, before +the oldest is dropped. The buffer drains in real time, so this is the +furthest you can push ahead — for example a long text-to-speech utterance +handed over in one call. Must be at least `10`. Defaults to `60000` (one +minute). + +*** + +### sampleRateHz? + +> `optional` **sampleRateHz**: `number` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:33](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L33) + +Sample rate of the PCM you will push, in hertz. Must be a positive +multiple of `100`. Push whatever your source produces natively — it is +resampled downstream. Defaults to `48000`. + +*** + +### sourceId? + +> `optional` **sourceId**: `string` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L27) + +Stable id identifying this custom source. Defaults to +`"customAudioSource"`. Every hook instance that streams at the same time +needs its own id — two instances sharing one silently replace each +other's published track. diff --git a/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceResult.md b/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceResult.md new file mode 100644 index 00000000..fa02ef28 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/interfaces/UseCustomAudioSourceResult.md @@ -0,0 +1,67 @@ +# Interface: UseCustomAudioSourceResult + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:48](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L48) + +## Properties + +### error + +> **error**: `null` \| `Error` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L70) + +The error that failed the last `startStreaming` or `stopStreaming` call, if any. + +*** + +### isStreaming + +> **isStreaming**: `boolean` + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:50](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L50) + +Whether the custom audio track is currently published. + +*** + +### startStreaming() + +> **startStreaming**: () => `Promise`\<`void`\> + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:64](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L64) + +Create the custom audio track and publish it. Once this resolves the +track is registered — pushed samples are streamed to the room right away +when the peer is connected, or automatically once it connects. No-op when +already streaming. + +#### Returns + +`Promise`\<`void`\> + +*** + +### stopStreaming() + +> **stopStreaming**: () => `Promise`\<`void`\> + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:68](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L68) + +Unpublish and release the custom audio track. No-op when not streaming. + +#### Returns + +`Promise`\<`void`\> + +*** + +### track + +> **track**: `null` \| [`CustomAudioTrack`](CustomAudioTrack.md) + +Defined in: [mobile-client/src/hooks/useCustomAudioSource.ts:57](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/useCustomAudioSource.ts#L57) + +Push handle for the published track; `null` until streaming starts. Hand +it to `pushAudioSamples` whenever your source produces audio. The handle +is plain and worklet-serializable, so it can be shared into a worklet and +pushed from there directly — no thread hop. diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioDevice.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioDevice.md new file mode 100644 index 00000000..c949ffc1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioDevice.md @@ -0,0 +1,47 @@ +# Type Alias: AudioDevice + +> **AudioDevice** = `object` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:16 + +Describes a single audio output device. + +## Properties + +### id + +> **id**: `string` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:24 + +Unique device identifier. + +*** + +### name + +> **name**: `string` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:22 + +Human-readable device name. + +*** + +### nativeType + +> **nativeType**: `string` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:20 + +Platform-specific device type string (e.g. AVAudioSession port type on iOS). + +*** + +### type + +> **type**: [`AudioDeviceType`](../enumerations/AudioDeviceType.md) + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:18 + +Normalized device category. diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioOutputChangedInfo.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioOutputChangedInfo.md new file mode 100644 index 00000000..2b62b98f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/AudioOutputChangedInfo.md @@ -0,0 +1,23 @@ +# Type Alias: AudioOutputChangedInfo + +> **AudioOutputChangedInfo** = `object` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:27 + +Payload emitted when the active audio output or the list of available devices changes. + +## Properties + +### availableAudioOutputs + +> **availableAudioOutputs**: [`AudioDevice`](AudioDevice.md)[] + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:29 + +*** + +### currentAudioOutput + +> **currentAudioOutput**: [`AudioDevice`](AudioDevice.md) \| `null` + +Defined in: react-native-webrtc/lib/typescript/audioOutputManager/AudioOutputManager.d.ts:28 diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/AuthErrorReason.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/AuthErrorReason.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/type-aliases/AuthErrorReason.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/AuthErrorReason.md diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/BandwidthLimits.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/BandwidthLimits.md similarity index 55% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/BandwidthLimits.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/BandwidthLimits.md index 2ce1bf63..e25e68b5 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/BandwidthLimits.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/BandwidthLimits.md @@ -2,7 +2,7 @@ > **BandwidthLimits** = `object` -Defined in: packages/react-client/dist/types/public.d.ts:59 +Defined in: react-client/dist/types/public.d.ts:61 ## Properties @@ -10,7 +10,7 @@ Defined in: packages/react-client/dist/types/public.d.ts:59 > **simulcast**: [`SimulcastBandwidthLimits`](SimulcastBandwidthLimits.md) -Defined in: packages/react-client/dist/types/public.d.ts:61 +Defined in: react-client/dist/types/public.d.ts:63 *** @@ -18,4 +18,4 @@ Defined in: packages/react-client/dist/types/public.d.ts:61 > **singleStream**: `number` -Defined in: packages/react-client/dist/types/public.d.ts:60 +Defined in: react-client/dist/types/public.d.ts:62 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Brand.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Brand.md similarity index 79% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/Brand.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/Brand.md index f77a606b..a48ef923 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Brand.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Brand.md @@ -2,7 +2,7 @@ > **Brand**\<`T`, `TBrand`\> = `T` & `object` -Defined in: packages/react-client/dist/types/public.d.ts:74 +Defined in: react-client/dist/types/public.d.ts:76 ## Type declaration diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitAction.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitAction.md new file mode 100644 index 00000000..83e8f408 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitAction.md @@ -0,0 +1,53 @@ +# Type Alias: CallKitAction + +> **CallKitAction** = `object` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:5 + +## Properties + +### answer? + +> `optional` **answer**: `undefined` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:7 + +*** + +### ended? + +> `optional` **ended**: `undefined` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:8 + +*** + +### failed? + +> `optional` **failed**: `string` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:9 + +*** + +### held? + +> `optional` **held**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:11 + +*** + +### muted? + +> `optional` **muted**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:10 + +*** + +### started? + +> `optional` **started**: `undefined` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:6 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitConfig.md new file mode 100644 index 00000000..41f91693 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CallKitConfig.md @@ -0,0 +1,21 @@ +# Type Alias: CallKitConfig + +> **CallKitConfig** = `object` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:1 + +## Properties + +### displayName + +> **displayName**: `string` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:2 + +*** + +### isVideo + +> **isVideo**: `boolean` + +Defined in: react-native-webrtc/lib/typescript/CallKit.d.ts:3 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectStreamerConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectStreamerConfig.md new file mode 100644 index 00000000..67f7100f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectStreamerConfig.md @@ -0,0 +1,21 @@ +# Type Alias: ConnectStreamerConfig + +> **ConnectStreamerConfig** = `object` + +Defined in: [mobile-client/src/overrides/types.ts:25](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L25) + +## Properties + +### inputs + +> **inputs**: [`StreamerInputs`](StreamerInputs.md) + +Defined in: [mobile-client/src/overrides/types.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L26) + +*** + +### token + +> **token**: `string` + +Defined in: [mobile-client/src/overrides/types.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L27) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectViewerConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectViewerConfig.md similarity index 69% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectViewerConfig.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectViewerConfig.md index 09c7fa34..91e87fed 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ConnectViewerConfig.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ConnectViewerConfig.md @@ -2,4 +2,4 @@ > **ConnectViewerConfig** = \{ `streamId?`: `never`; `token`: `string`; \} \| \{ `streamId`: `string`; `token?`: `never`; \} -Defined in: packages/react-client/dist/hooks/useLivestreamViewer.d.ts:2 +Defined in: react-client/dist/hooks/useLivestreamViewer.d.ts:2 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/CustomSource.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CustomSource.md new file mode 100644 index 00000000..43edca87 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/CustomSource.md @@ -0,0 +1,17 @@ +# Type Alias: CustomSource\ + +> **CustomSource**\<`T`\> = `Omit`\<`ReactClientCustomSource`\<`T`\>, `"stream"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:121](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L121) + +## Type declaration + +### stream? + +> `optional` **stream**: [`MediaStream`](../classes/MediaStream.md) + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` *extends* `string` | diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/DataCallback.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/DataCallback.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/type-aliases/DataCallback.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/DataCallback.md diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceError.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceError.md similarity index 76% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceError.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceError.md index 60ad1a3a..3e703193 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DeviceError.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceError.md @@ -2,4 +2,4 @@ > **DeviceError** = \{ `name`: `"OverconstrainedError"`; \} \| \{ `name`: `"NotAllowedError"`; \} \| \{ `name`: `"NotFoundError"`; \} \| \{ `name`: `"UNHANDLED_ERROR"`; \} -Defined in: packages/react-client/dist/types/public.d.ts:64 +Defined in: react-client/dist/types/public.d.ts:66 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceItem.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceItem.md new file mode 100644 index 00000000..4cfe34c6 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/DeviceItem.md @@ -0,0 +1,21 @@ +# Type Alias: DeviceItem + +> **DeviceItem** = `object` + +Defined in: react-client/dist/types/public.d.ts:45 + +## Properties + +### deviceId + +> **deviceId**: `string` + +Defined in: react-client/dist/types/public.d.ts:46 + +*** + +### label + +> **label**: `string` + +Defined in: react-client/dist/types/public.d.ts:47 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/FishjamProviderProps.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/FishjamProviderProps.md new file mode 100644 index 00000000..1e95d052 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/FishjamProviderProps.md @@ -0,0 +1,5 @@ +# Type Alias: FishjamProviderProps + +> **FishjamProviderProps** = `Omit`\<`ReactClientFishjamProviderProps`, `"persistLastDevice"` \| `"fishjamClient"`\> + +Defined in: [mobile-client/src/index.ts:126](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/index.ts#L126) diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/ForegroundServiceConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ForegroundServiceConfig.md new file mode 100644 index 00000000..8f1a7048 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ForegroundServiceConfig.md @@ -0,0 +1,79 @@ +# Type Alias: ForegroundServiceConfig + +> **ForegroundServiceConfig** = `object` + +Defined in: [mobile-client/src/useForegroundService.ts:8](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L8) + +Configuration options for foreground service permissions. + +A type representing the configuration for foreground service permissions. + +## Properties + +### channelId? + +> `optional` **channelId**: `string` + +Defined in: [mobile-client/src/useForegroundService.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L24) + +The id of the channel. Must be unique per package. + +*** + +### channelName? + +> `optional` **channelName**: `string` + +Defined in: [mobile-client/src/useForegroundService.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L28) + +The user visible name of the channel. + +*** + +### enableCamera? + +> `optional` **enableCamera**: `boolean` + +Defined in: [mobile-client/src/useForegroundService.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L12) + +Indicates whether the camera is enabled for the foreground service. + +*** + +### enableMicrophone? + +> `optional` **enableMicrophone**: `boolean` + +Defined in: [mobile-client/src/useForegroundService.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L16) + +Indicates whether the microphone is enabled for the foreground service. + +*** + +### enableScreenSharing? + +> `optional` **enableScreenSharing**: `boolean` + +Defined in: [mobile-client/src/useForegroundService.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L20) + +Indicates whether screen sharing is enabled for the foreground service. + +*** + +### notificationContent? + +> `optional` **notificationContent**: `string` + +Defined in: [mobile-client/src/useForegroundService.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L36) + +The text (second row) of the notification, in a standard notification. + +*** + +### notificationTitle? + +> `optional` **notificationTitle**: `string` + +Defined in: [mobile-client/src/useForegroundService.ts:32](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L32) + +The title (first row) of the notification, in a standard notification. diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesResult.md new file mode 100644 index 00000000..b05f6ce4 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesResult.md @@ -0,0 +1,11 @@ +# Type Alias: InitializeDevicesResult + +> **InitializeDevicesResult** = `Omit`\<`ReactClientInitializeDevicesResult`, `"stream"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:123](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L123) + +## Type declaration + +### stream + +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `null` diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesSettings.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesSettings.md new file mode 100644 index 00000000..da51ce39 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesSettings.md @@ -0,0 +1,21 @@ +# Type Alias: InitializeDevicesSettings + +> **InitializeDevicesSettings** = `object` + +Defined in: react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:9 + +## Properties + +### enableAudio? + +> `optional` **enableAudio**: `boolean` + +Defined in: react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:11 + +*** + +### enableVideo? + +> `optional` **enableVideo**: `boolean` + +Defined in: react-client/dist/hooks/internal/devices/useMediaDevices.d.ts:10 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesStatus.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesStatus.md similarity index 73% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesStatus.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesStatus.md index b3efe444..fa077641 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/InitializeDevicesStatus.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/InitializeDevicesStatus.md @@ -2,4 +2,4 @@ > **InitializeDevicesStatus** = `"initialized"` \| `"failed"` \| `"initialized_with_errors"` \| `"already_initialized"` -Defined in: packages/react-client/dist/types/public.d.ts:2 +Defined in: react-client/dist/types/public.d.ts:2 diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/JoinErrorReason.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/JoinErrorReason.md similarity index 67% rename from versioned_docs/version-0.26.0/api/web/type-aliases/JoinErrorReason.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/JoinErrorReason.md index 62cc2c46..16f20741 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/JoinErrorReason.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/JoinErrorReason.md @@ -2,4 +2,4 @@ > **JoinErrorReason** = *typeof* `JOIN_ERRORS`\[`number`\] -Defined in: ts-client/dist/index.d.mts:937 +Defined in: ts-client/dist/index.d.mts:941 diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/Metadata.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Metadata.md similarity index 80% rename from versioned_docs/version-0.26.0/api/web/type-aliases/Metadata.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/Metadata.md index b6cac4dc..956ea26c 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/Metadata.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Metadata.md @@ -2,7 +2,7 @@ > **Metadata**\<`PeerMetadata`, `ServerMetadata`\> = `object` -Defined in: ts-client/dist/index.d.mts:968 +Defined in: ts-client/dist/index.d.mts:972 ## Type Parameters @@ -17,7 +17,7 @@ Defined in: ts-client/dist/index.d.mts:968 > **peer**: `PeerMetadata` -Defined in: ts-client/dist/index.d.mts:969 +Defined in: ts-client/dist/index.d.mts:973 *** @@ -25,4 +25,4 @@ Defined in: ts-client/dist/index.d.mts:969 > **server**: `ServerMetadata` -Defined in: ts-client/dist/index.d.mts:970 +Defined in: ts-client/dist/index.d.mts:974 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/MiddlewareResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/MiddlewareResult.md new file mode 100644 index 00000000..64839ef9 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/MiddlewareResult.md @@ -0,0 +1,25 @@ +# Type Alias: MiddlewareResult + +> **MiddlewareResult** = `object` + +Defined in: [mobile-client/src/overrides/types.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L38) + +## Properties + +### onClear()? + +> `optional` **onClear**: () => `void` + +Defined in: [mobile-client/src/overrides/types.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L38) + +#### Returns + +`void` + +*** + +### track + +> **track**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) + +Defined in: [mobile-client/src/overrides/types.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L38) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerId.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerId.md similarity index 57% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerId.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerId.md index 2fc229ef..c8a05ca1 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerId.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerId.md @@ -2,4 +2,4 @@ > **PeerId** = [`Brand`](Brand.md)\<`string`, `"PeerId"`\> -Defined in: packages/react-client/dist/types/public.d.ts:12 +Defined in: react-client/dist/types/public.d.ts:12 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerStatus.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerStatus.md similarity index 87% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerStatus.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerStatus.md index ae00a192..f5b58918 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerStatus.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerStatus.md @@ -2,7 +2,7 @@ > **PeerStatus** = `"connecting"` \| `"connected"` \| `"error"` \| `"idle"` -Defined in: packages/react-client/dist/types/public.d.ts:42 +Defined in: react-client/dist/types/public.d.ts:44 Represents the possible statuses of a peer connection. diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerWithTracks.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerWithTracks.md similarity index 78% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerWithTracks.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerWithTracks.md index 68ff9437..0f7e5998 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PeerWithTracks.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PeerWithTracks.md @@ -2,7 +2,7 @@ > **PeerWithTracks**\<`P`, `S`, `T`\> = `Omit`\<`ReactClientPeerWithTracks`\<`P`, `S`\>, [`TrackFields`](TrackFields.md)\> & `object` -Defined in: [packages/mobile-client/src/overrides/types.ts:79](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L79) +Defined in: [mobile-client/src/overrides/types.ts:136](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L136) ## Type declaration diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PermissionStatus.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PermissionStatus.md similarity index 61% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/PermissionStatus.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/PermissionStatus.md index c673c28e..07f650ef 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PermissionStatus.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PermissionStatus.md @@ -2,7 +2,7 @@ > **PermissionStatus** = `"granted"` \| `"denied"` \| `"prompt"` -Defined in: [packages/mobile-client/src/hooks/usePermissions.ts:11](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/hooks/usePermissions.ts#L11) +Defined in: [mobile-client/src/hooks/usePermissions.ts:11](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/hooks/usePermissions.ts#L11) The current status of a device permission. diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md similarity index 76% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md index f2492589..6dbc4c87 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/PersistLastDeviceHandlers.md @@ -2,7 +2,7 @@ > **PersistLastDeviceHandlers** = `object` -Defined in: packages/react-client/dist/types/public.d.ts:47 +Defined in: react-client/dist/types/public.d.ts:49 ## Properties @@ -10,7 +10,7 @@ Defined in: packages/react-client/dist/types/public.d.ts:47 > **getLastDevice**: (`deviceType`) => `MediaDeviceInfo` \| `null` -Defined in: packages/react-client/dist/types/public.d.ts:48 +Defined in: react-client/dist/types/public.d.ts:50 #### Parameters @@ -28,7 +28,7 @@ Defined in: packages/react-client/dist/types/public.d.ts:48 > **saveLastDevice**: (`info`, `deviceType`) => `void` -Defined in: packages/react-client/dist/types/public.d.ts:49 +Defined in: react-client/dist/types/public.d.ts:51 #### Parameters diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCPIPViewProps.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCPIPViewProps.md new file mode 100644 index 00000000..647e5b58 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCPIPViewProps.md @@ -0,0 +1,11 @@ +# Type Alias: RTCPIPViewProps + +> **RTCPIPViewProps** = `Omit`\<`React.ComponentPropsWithRef`\<*typeof* `OriginalRTCPIPView`\>, `"streamURL"`\> & `object` + +Defined in: [mobile-client/src/overrides/RTCView.tsx:10](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/RTCView.tsx#L10) + +## Type declaration + +### mediaStream + +> **mediaStream**: [`MediaStream`](../classes/MediaStream.md) diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCVideoViewProps.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCVideoViewProps.md new file mode 100644 index 00000000..3da697ec --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RTCVideoViewProps.md @@ -0,0 +1,11 @@ +# Type Alias: RTCVideoViewProps + +> **RTCVideoViewProps** = `Omit`\<`React.ComponentPropsWithRef`\<*typeof* `OriginalRTCView`\>, `"streamURL"`\> & `object` + +Defined in: [mobile-client/src/overrides/RTCView.tsx:6](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/RTCView.tsx#L6) + +## Type declaration + +### mediaStream + +> **mediaStream**: [`MediaStream`](../classes/MediaStream.md) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectConfig.md similarity index 69% rename from versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectConfig.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectConfig.md index 8dad73ae..ef54d500 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectConfig.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectConfig.md @@ -2,7 +2,7 @@ > **ReconnectConfig** = `object` -Defined in: ts-client/dist/index.d.mts:941 +Defined in: ts-client/dist/index.d.mts:945 ## Properties @@ -10,7 +10,7 @@ Defined in: ts-client/dist/index.d.mts:941 > `optional` **addTracksOnReconnect**: `boolean` -Defined in: ts-client/dist/index.d.mts:945 +Defined in: ts-client/dist/index.d.mts:949 *** @@ -18,7 +18,7 @@ Defined in: ts-client/dist/index.d.mts:945 > `optional` **delay**: `number` -Defined in: ts-client/dist/index.d.mts:944 +Defined in: ts-client/dist/index.d.mts:948 *** @@ -26,7 +26,7 @@ Defined in: ts-client/dist/index.d.mts:944 > `optional` **initialDelay**: `number` -Defined in: ts-client/dist/index.d.mts:943 +Defined in: ts-client/dist/index.d.mts:947 *** @@ -34,4 +34,4 @@ Defined in: ts-client/dist/index.d.mts:943 > `optional` **maxAttempts**: `number` -Defined in: ts-client/dist/index.d.mts:942 +Defined in: ts-client/dist/index.d.mts:946 diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectionStatus.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectionStatus.md similarity index 70% rename from versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectionStatus.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectionStatus.md index e2db85e8..344a388a 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/ReconnectionStatus.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/ReconnectionStatus.md @@ -2,4 +2,4 @@ > **ReconnectionStatus** = `"reconnecting"` \| `"idle"` \| `"error"` -Defined in: ts-client/dist/index.d.mts:940 +Defined in: ts-client/dist/index.d.mts:944 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/RemoteTrack.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RemoteTrack.md new file mode 100644 index 00000000..f2d0176d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RemoteTrack.md @@ -0,0 +1,15 @@ +# Type Alias: RemoteTrack + +> **RemoteTrack** = `Omit`\<`ReactClientRemoteTrack`, `"stream"` \| `"track"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:116](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L116) + +## Type declaration + +### stream + +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `null` + +### track + +> **track**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RoomType.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RoomType.md similarity index 59% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/RoomType.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/RoomType.md index 3b87f487..8cd16cdb 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/RoomType.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/RoomType.md @@ -2,4 +2,4 @@ > **RoomType** = `"conference"` \| `"livestream"` \| `"audio_only"` -Defined in: packages/react-client/dist/hooks/useSandbox.d.ts:6 +Defined in: react-client/dist/hooks/useSandbox.d.ts:8 diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/SimulcastBandwidthLimit.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/SimulcastBandwidthLimit.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/type-aliases/SimulcastBandwidthLimit.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/SimulcastBandwidthLimit.md diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md new file mode 100644 index 00000000..1e3c36b4 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/SimulcastBandwidthLimits.md @@ -0,0 +1,29 @@ +# Type Alias: SimulcastBandwidthLimits + +> **SimulcastBandwidthLimits** = `object` + +Defined in: react-client/dist/types/public.d.ts:53 + +## Properties + +### 1 + +> **1**: `number` + +Defined in: react-client/dist/types/public.d.ts:54 + +*** + +### 2 + +> **2**: `number` + +Defined in: react-client/dist/types/public.d.ts:55 + +*** + +### 3 + +> **3**: `number` + +Defined in: react-client/dist/types/public.d.ts:56 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamConfig.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamConfig.md similarity index 60% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamConfig.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamConfig.md index 9915e8c7..b569d289 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/StreamConfig.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamConfig.md @@ -2,7 +2,7 @@ > **StreamConfig** = `object` -Defined in: packages/react-client/dist/types/public.d.ts:56 +Defined in: react-client/dist/types/public.d.ts:58 ## Properties @@ -10,4 +10,4 @@ Defined in: packages/react-client/dist/types/public.d.ts:56 > `optional` **sentQualities**: [`Variant`](../enumerations/Variant.md)[] \| `false` -Defined in: packages/react-client/dist/types/public.d.ts:57 +Defined in: react-client/dist/types/public.d.ts:59 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamerInputs.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamerInputs.md new file mode 100644 index 00000000..00889d9f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/StreamerInputs.md @@ -0,0 +1,5 @@ +# Type Alias: StreamerInputs + +> **StreamerInputs** = \{ `audio?`: [`MediaStream`](../classes/MediaStream.md) \| `null`; `video`: [`MediaStream`](../classes/MediaStream.md); \} \| \{ `audio`: [`MediaStream`](../classes/MediaStream.md); `video?`: `null`; \} + +Defined in: [mobile-client/src/overrides/types.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L21) diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/Track.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Track.md new file mode 100644 index 00000000..5f819122 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/Track.md @@ -0,0 +1,15 @@ +# Type Alias: Track + +> **Track** = `Omit`\<`ReactClientTrack`, `"stream"` \| `"track"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:111](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L111) + +## Type declaration + +### stream + +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `null` + +### track + +> **track**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/TrackBandwidthLimit.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackBandwidthLimit.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/type-aliases/TrackBandwidthLimit.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackBandwidthLimit.md diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackFields.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackFields.md similarity index 50% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackFields.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackFields.md index ea43dd14..ac75a7b3 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackFields.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackFields.md @@ -2,4 +2,4 @@ > **TrackFields** = `"tracks"` \| `"cameraTrack"` \| `"microphoneTrack"` \| `"screenShareVideoTrack"` \| `"screenShareAudioTrack"` \| `"customVideoTracks"` \| `"customAudioTracks"` -Defined in: [packages/mobile-client/src/overrides/types.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L70) +Defined in: [mobile-client/src/overrides/types.ts:127](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L127) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackId.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackId.md similarity index 58% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackId.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackId.md index ffa28500..dfd76da0 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackId.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackId.md @@ -2,4 +2,4 @@ > **TrackId** = [`Brand`](Brand.md)\<`string`, `"TrackId"`\> -Defined in: packages/react-client/dist/types/public.d.ts:11 +Defined in: react-client/dist/types/public.d.ts:11 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackMiddleware.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackMiddleware.md new file mode 100644 index 00000000..8c765402 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TrackMiddleware.md @@ -0,0 +1,5 @@ +# Type Alias: TrackMiddleware + +> **TrackMiddleware** = (`track`) => [`MiddlewareResult`](MiddlewareResult.md) \| `Promise`\<[`MiddlewareResult`](MiddlewareResult.md)\> \| `null` + +Defined in: [mobile-client/src/overrides/types.ts:40](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L40) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddleware.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddleware.md similarity index 53% rename from versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddleware.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddleware.md index 9f6aab9c..229a295d 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/TracksMiddleware.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddleware.md @@ -2,14 +2,14 @@ > **TracksMiddleware** = (`videoTrack`, `audioTrack`) => [`TracksMiddlewareResult`](TracksMiddlewareResult.md) \| `Promise`\<[`TracksMiddlewareResult`](TracksMiddlewareResult.md)\> -Defined in: [react-client/src/types/public.ts:40](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L40) +Defined in: [mobile-client/src/overrides/types.ts:48](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L48) ## Parameters | Parameter | Type | | ------ | ------ | -| `videoTrack` | `MediaStreamTrack` | -| `audioTrack` | `MediaStreamTrack` \| `null` | +| `videoTrack` | [`MediaStreamTrack`](../classes/MediaStreamTrack.md) | +| `audioTrack` | [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` | ## Returns diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddlewareResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddlewareResult.md new file mode 100644 index 00000000..d4c9776d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/TracksMiddlewareResult.md @@ -0,0 +1,33 @@ +# Type Alias: TracksMiddlewareResult + +> **TracksMiddlewareResult** = `object` + +Defined in: [mobile-client/src/overrides/types.ts:42](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L42) + +## Properties + +### audioTrack + +> **audioTrack**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` + +Defined in: [mobile-client/src/overrides/types.ts:44](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L44) + +*** + +### onClear() + +> **onClear**: () => `void` + +Defined in: [mobile-client/src/overrides/types.ts:45](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L45) + +#### Returns + +`void` + +*** + +### videoTrack + +> **videoTrack**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) + +Defined in: [mobile-client/src/overrides/types.ts:43](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L43) diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseAudioOutputResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseAudioOutputResult.md new file mode 100644 index 00000000..93785d4d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseAudioOutputResult.md @@ -0,0 +1,45 @@ +# Type Alias: UseAudioOutputResult + +> **UseAudioOutputResult** = `object` + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:2 + +## Properties + +### android + +> **android**: *typeof* `AudioOutputManager.android` + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:10 + +Android-only controls. Throws on other platforms. + +*** + +### availableAudioOutputs + +> **availableAudioOutputs**: [`AudioDevice`](AudioDevice.md)[] + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:6 + +All output devices currently reachable. + +*** + +### currentAudioOutput + +> **currentAudioOutput**: [`AudioDevice`](AudioDevice.md) \| `null` + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:4 + +Active output device, or `null` if not yet known. + +*** + +### ios + +> **ios**: *typeof* `AudioOutputManager.ios` + +Defined in: react-native-webrtc/lib/typescript/useAudioOutput.d.ts:8 + +iOS-only controls. Throws on other platforms. diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCameraResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCameraResult.md new file mode 100644 index 00000000..0adfd892 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCameraResult.md @@ -0,0 +1,43 @@ +# Type Alias: UseCameraResult + +> **UseCameraResult** = `Omit`\<`ReturnType`\<*typeof* `useCameraReactClient`\>, `"cameraStream"` \| `"startCamera"` \| `"currentCameraMiddleware"` \| `"setCameraTrackMiddleware"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:53](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L53) + +## Type declaration + +### cameraStream + +> **cameraStream**: [`MediaStream`](../classes/MediaStream.md) \| `null` + +### currentCameraMiddleware + +> **currentCameraMiddleware**: [`TrackMiddleware`](TrackMiddleware.md) + +### setCameraTrackMiddleware() + +> **setCameraTrackMiddleware**: (`middleware`) => `Promise`\<`void`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `middleware` | [`TrackMiddleware`](TrackMiddleware.md) | + +#### Returns + +`Promise`\<`void`\> + +### startCamera() + +> **startCamera**: (...`args`) => `Promise`\<\[[`MediaStreamTrack`](../classes/MediaStreamTrack.md), `null`\] \| \[`null`, [`DeviceError`](DeviceError.md)\]\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | `Parameters`\<`ReturnType`\<*typeof* `useCameraReactClient`\>\[`"startCamera"`\]\> | + +#### Returns + +`Promise`\<\[[`MediaStreamTrack`](../classes/MediaStreamTrack.md), `null`\] \| \[`null`, [`DeviceError`](DeviceError.md)\]\> diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCustomSourceResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCustomSourceResult.md similarity index 51% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCustomSourceResult.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCustomSourceResult.md index 675bdb17..523d4018 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseCustomSourceResult.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseCustomSourceResult.md @@ -2,7 +2,7 @@ > **UseCustomSourceResult** = `Omit`\<`ReturnType`\<*typeof* `useCustomSourceReactClient`\>, `"stream"` \| `"setStream"`\> & `object` -Defined in: [packages/mobile-client/src/overrides/types.ts:49](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L49) +Defined in: [mobile-client/src/overrides/types.ts:100](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L100) ## Type declaration @@ -14,7 +14,7 @@ Defined in: [packages/mobile-client/src/overrides/types.ts:49](https://github.co | Parameter | Type | | ------ | ------ | -| `newStream` | `RNMediaStream` \| `null` | +| `newStream` | [`MediaStream`](../classes/MediaStream.md) \| `null` | #### Returns @@ -22,4 +22,4 @@ Defined in: [packages/mobile-client/src/overrides/types.ts:49](https://github.co ### stream -> **stream**: `RNMediaStream` \| `undefined` +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `undefined` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseDataChannelResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseDataChannelResult.md similarity index 80% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/UseDataChannelResult.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/UseDataChannelResult.md index 2c90c9b0..5eb4e0d1 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseDataChannelResult.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseDataChannelResult.md @@ -2,7 +2,7 @@ > **UseDataChannelResult** = `object` -Defined in: packages/react-client/dist/types/public.d.ts:85 +Defined in: react-client/dist/types/public.d.ts:87 ## Properties @@ -10,7 +10,7 @@ Defined in: packages/react-client/dist/types/public.d.ts:85 > **dataChannelError**: `Error` \| `null` -Defined in: packages/react-client/dist/types/public.d.ts:118 +Defined in: react-client/dist/types/public.d.ts:120 Error that occurred during data publisher operations, or null if no error. @@ -20,7 +20,7 @@ Error that occurred during data publisher operations, or null if no error. > **dataChannelLoading**: `boolean` -Defined in: packages/react-client/dist/types/public.d.ts:114 +Defined in: react-client/dist/types/public.d.ts:116 Whether data channels are being initialized. @@ -30,7 +30,7 @@ Whether data channels are being initialized. > **dataChannelReady**: `boolean` -Defined in: packages/react-client/dist/types/public.d.ts:110 +Defined in: react-client/dist/types/public.d.ts:112 Whether data channels are connected and ready to send data. Resets to false on disconnect. @@ -41,7 +41,7 @@ Resets to false on disconnect. > **initializeDataChannel**: () => `void` -Defined in: packages/react-client/dist/types/public.d.ts:91 +Defined in: react-client/dist/types/public.d.ts:93 Initializes the data channel. @@ -57,7 +57,7 @@ Requires that the fishjam client is already connected. > **publishData**: (`payload`, `options`) => `void` -Defined in: packages/react-client/dist/types/public.d.ts:97 +Defined in: react-client/dist/types/public.d.ts:99 Sends binary data through a data channel. @@ -78,7 +78,7 @@ Sends binary data through a data channel. > **subscribeData**: (`callback`, `options`) => () => `void` -Defined in: packages/react-client/dist/types/public.d.ts:105 +Defined in: react-client/dist/types/public.d.ts:107 Subscribe to incoming data on a data channel. Can be called before or after channel creation. diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesParams.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesParams.md new file mode 100644 index 00000000..e862ab06 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesParams.md @@ -0,0 +1,21 @@ +# Type Alias: UseInitializeDevicesParams + +> **UseInitializeDevicesParams** = `object` + +Defined in: react-client/dist/hooks/devices/useInitializeDevices.d.ts:1 + +## Properties + +### enableAudio? + +> `optional` **enableAudio**: `boolean` + +Defined in: react-client/dist/hooks/devices/useInitializeDevices.d.ts:3 + +*** + +### enableVideo? + +> `optional` **enableVideo**: `boolean` + +Defined in: react-client/dist/hooks/devices/useInitializeDevices.d.ts:2 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md similarity index 54% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md index af933af1..5bb68465 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseInitializeDevicesReturn.md @@ -2,7 +2,7 @@ > **UseInitializeDevicesReturn** = `object` -Defined in: [packages/mobile-client/src/overrides/types.ts:54](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L54) +Defined in: [mobile-client/src/overrides/types.ts:105](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L105) ## Properties @@ -10,7 +10,7 @@ Defined in: [packages/mobile-client/src/overrides/types.ts:54](https://github.co > **initializeDevices**: (...`args`) => `Promise`\<[`InitializeDevicesResult`](InitializeDevicesResult.md)\> -Defined in: [packages/mobile-client/src/overrides/types.ts:55](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L55) +Defined in: [mobile-client/src/overrides/types.ts:106](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L106) #### Parameters diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md similarity index 68% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md rename to versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md index cae18006..9558ff85 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamStreamerResult.md @@ -2,7 +2,7 @@ > **UseLivestreamStreamerResult** = `Omit`\<`ReactClientUseLivestreamStreamerResult`, `"connect"`\> & `object` -Defined in: [packages/mobile-client/src/overrides/types.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/overrides/types.ts#L26) +Defined in: [mobile-client/src/overrides/types.ts:30](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L30) ## Type declaration diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamViewerResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamViewerResult.md new file mode 100644 index 00000000..ba563b04 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseLivestreamViewerResult.md @@ -0,0 +1,11 @@ +# Type Alias: UseLivestreamViewerResult + +> **UseLivestreamViewerResult** = `Omit`\<`ReactClientUseLivestreamViewerResult`, `"stream"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:34](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L34) + +## Type declaration + +### stream + +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `null` diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseMicrophoneResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseMicrophoneResult.md new file mode 100644 index 00000000..3f330059 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseMicrophoneResult.md @@ -0,0 +1,43 @@ +# Type Alias: UseMicrophoneResult + +> **UseMicrophoneResult** = `Omit`\<`ReturnType`\<*typeof* `useMicrophoneReactClient`\>, `"toggleMicrophoneMute"` \| `"microphoneStream"` \| `"startMicrophone"` \| `"currentMicrophoneMiddleware"` \| `"setMicrophoneTrackMiddleware"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:65](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L65) + +## Type declaration + +### currentMicrophoneMiddleware + +> **currentMicrophoneMiddleware**: [`TrackMiddleware`](TrackMiddleware.md) + +### microphoneStream + +> **microphoneStream**: [`MediaStream`](../classes/MediaStream.md) \| `null` + +### setMicrophoneTrackMiddleware() + +> **setMicrophoneTrackMiddleware**: (`middleware`) => `Promise`\<`void`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `middleware` | [`TrackMiddleware`](TrackMiddleware.md) | + +#### Returns + +`Promise`\<`void`\> + +### startMicrophone() + +> **startMicrophone**: (...`args`) => `Promise`\<\[[`MediaStreamTrack`](../classes/MediaStreamTrack.md), `null`\] \| \[`null`, [`DeviceError`](DeviceError.md)\]\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | `Parameters`\<`ReturnType`\<*typeof* `useMicrophoneReactClient`\>\[`"startMicrophone"`\]\> | + +#### Returns + +`Promise`\<\[[`MediaStreamTrack`](../classes/MediaStreamTrack.md), `null`\] \| \[`null`, [`DeviceError`](DeviceError.md)\]\> diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseSandboxProps.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseSandboxProps.md new file mode 100644 index 00000000..73cb75a0 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseSandboxProps.md @@ -0,0 +1,13 @@ +# Type Alias: UseSandboxProps + +> **UseSandboxProps** = `object` + +Defined in: react-client/dist/hooks/useSandbox.d.ts:5 + +## Properties + +### sandboxApiUrl + +> **sandboxApiUrl**: `string` + +Defined in: react-client/dist/hooks/useSandbox.d.ts:6 diff --git a/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseScreenShareResult.md b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseScreenShareResult.md new file mode 100644 index 00000000..dd6fea82 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/type-aliases/UseScreenShareResult.md @@ -0,0 +1,51 @@ +# Type Alias: UseScreenShareResult + +> **UseScreenShareResult** = `Omit`\<`ReturnType`\<*typeof* `useScreenShareReactClient`\>, `"stream"` \| `"videoTrack"` \| `"audioTrack"` \| `"currentTracksMiddleware"` \| `"setTracksMiddleware"`\> & `object` + +Defined in: [mobile-client/src/overrides/types.ts:81](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/overrides/types.ts#L81) + +## Type declaration + +### audioTrack + +> **audioTrack**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` + +### currentTracksMiddleware + +> **currentTracksMiddleware**: [`TracksMiddleware`](TracksMiddleware.md) \| `null` + +### presentBroadcastPicker() + +> **presentBroadcastPicker**: () => `Promise`\<`void`\> + +iOS only. Presents the system `RPSystemBroadcastPickerView`. When a +broadcast is active, this opens the system "Stop Broadcast" sheet so +the user can end it cleanly (via `broadcastFinished()`) and avoid the +"Screen sharing stopped" error dialog that `stopStreaming` triggers +by force-closing the host-side socket. No-op on non-iOS. + +#### Returns + +`Promise`\<`void`\> + +### setTracksMiddleware() + +> **setTracksMiddleware**: (`middleware`) => `Promise`\<`void`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `middleware` | [`TracksMiddleware`](TracksMiddleware.md) \| `null` | + +#### Returns + +`Promise`\<`void`\> + +### stream + +> **stream**: [`MediaStream`](../classes/MediaStream.md) \| `null` + +### videoTrack + +> **videoTrack**: [`MediaStreamTrack`](../classes/MediaStreamTrack.md) \| `null` diff --git a/versioned_docs/version-0.29.0/api/mobile/typedoc-sidebar.cjs b/versioned_docs/version-0.29.0/api/mobile/typedoc-sidebar.cjs new file mode 100644 index 00000000..41a68190 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/typedoc-sidebar.cjs @@ -0,0 +1,4 @@ +// @ts-check +/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ +const typedocSidebar = {items:[{type:"category",label:"Connection",items:[{type:"doc",id:"api/mobile/functions/useConnection",label:"useConnection"},{type:"doc",id:"api/mobile/functions/useDataChannel",label:"useDataChannel"},{type:"doc",id:"api/mobile/type-aliases/Metadata",label:"Metadata"},{type:"doc",id:"api/mobile/variables/useUpdatePeerMetadata",label:"useUpdatePeerMetadata"},{type:"doc",id:"api/mobile/variables/useVAD",label:"useVAD"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/mobile/functions/FishjamProvider",label:"FishjamProvider"},{type:"doc",id:"api/mobile/functions/pushAudioSamples",label:"pushAudioSamples"},{type:"doc",id:"api/mobile/functions/RTCPIPView",label:"RTCPIPView"},{type:"doc",id:"api/mobile/functions/RTCView",label:"RTCView"},{type:"doc",id:"api/mobile/functions/startPIP",label:"startPIP"},{type:"doc",id:"api/mobile/functions/stopPIP",label:"stopPIP"},{type:"doc",id:"api/mobile/functions/useAudioOutput",label:"useAudioOutput"},{type:"doc",id:"api/mobile/functions/useCallKit",label:"useCallKit"},{type:"doc",id:"api/mobile/functions/useCallKitEvent",label:"useCallKitEvent"},{type:"doc",id:"api/mobile/functions/useCallKitService",label:"useCallKitService"},{type:"doc",id:"api/mobile/functions/useCamera",label:"useCamera"},{type:"doc",id:"api/mobile/functions/useCameraPermissions",label:"useCameraPermissions"},{type:"doc",id:"api/mobile/functions/useCustomAudioSource",label:"useCustomAudioSource"},{type:"doc",id:"api/mobile/functions/useCustomSource",label:"useCustomSource"},{type:"doc",id:"api/mobile/functions/useInitializeDevices",label:"useInitializeDevices"},{type:"doc",id:"api/mobile/functions/useLivestreamStreamer",label:"useLivestreamStreamer"},{type:"doc",id:"api/mobile/functions/useLivestreamViewer",label:"useLivestreamViewer"},{type:"doc",id:"api/mobile/functions/useMicrophone",label:"useMicrophone"},{type:"doc",id:"api/mobile/functions/useMicrophonePermissions",label:"useMicrophonePermissions"},{type:"doc",id:"api/mobile/functions/usePeers",label:"usePeers"},{type:"doc",id:"api/mobile/functions/useScreenShare",label:"useScreenShare"},{type:"doc",id:"api/mobile/enumerations/AudioDeviceType",label:"AudioDeviceType"},{type:"doc",id:"api/mobile/enumerations/Variant",label:"Variant"},{type:"doc",id:"api/mobile/classes/MediaStream",label:"MediaStream"},{type:"doc",id:"api/mobile/classes/MediaStreamTrack",label:"MediaStreamTrack"},{type:"doc",id:"api/mobile/interfaces/CustomAudioSink",label:"CustomAudioSink"},{type:"doc",id:"api/mobile/interfaces/CustomAudioTrack",label:"CustomAudioTrack"},{type:"doc",id:"api/mobile/interfaces/DataChannelOptions",label:"DataChannelOptions"},{type:"doc",id:"api/mobile/interfaces/JoinRoomConfig",label:"JoinRoomConfig"},{type:"doc",id:"api/mobile/interfaces/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/mobile/interfaces/UseCustomAudioSourceOptions",label:"UseCustomAudioSourceOptions"},{type:"doc",id:"api/mobile/interfaces/UseCustomAudioSourceResult",label:"UseCustomAudioSourceResult"},{type:"doc",id:"api/mobile/type-aliases/AudioDevice",label:"AudioDevice"},{type:"doc",id:"api/mobile/type-aliases/AudioOutputChangedInfo",label:"AudioOutputChangedInfo"},{type:"doc",id:"api/mobile/type-aliases/AuthErrorReason",label:"AuthErrorReason"},{type:"doc",id:"api/mobile/type-aliases/BandwidthLimits",label:"BandwidthLimits"},{type:"doc",id:"api/mobile/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/mobile/type-aliases/CallKitAction",label:"CallKitAction"},{type:"doc",id:"api/mobile/type-aliases/CallKitConfig",label:"CallKitConfig"},{type:"doc",id:"api/mobile/type-aliases/ConnectStreamerConfig",label:"ConnectStreamerConfig"},{type:"doc",id:"api/mobile/type-aliases/ConnectViewerConfig",label:"ConnectViewerConfig"},{type:"doc",id:"api/mobile/type-aliases/CustomSource",label:"CustomSource"},{type:"doc",id:"api/mobile/type-aliases/DataCallback",label:"DataCallback"},{type:"doc",id:"api/mobile/type-aliases/DeviceError",label:"DeviceError"},{type:"doc",id:"api/mobile/type-aliases/DeviceItem",label:"DeviceItem"},{type:"doc",id:"api/mobile/type-aliases/FishjamProviderProps",label:"FishjamProviderProps"},{type:"doc",id:"api/mobile/type-aliases/ForegroundServiceConfig",label:"ForegroundServiceConfig"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesResult",label:"InitializeDevicesResult"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesSettings",label:"InitializeDevicesSettings"},{type:"doc",id:"api/mobile/type-aliases/InitializeDevicesStatus",label:"InitializeDevicesStatus"},{type:"doc",id:"api/mobile/type-aliases/JoinErrorReason",label:"JoinErrorReason"},{type:"doc",id:"api/mobile/type-aliases/MiddlewareResult",label:"MiddlewareResult"},{type:"doc",id:"api/mobile/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/mobile/type-aliases/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/mobile/type-aliases/PeerWithTracks",label:"PeerWithTracks"},{type:"doc",id:"api/mobile/type-aliases/PermissionStatus",label:"PermissionStatus"},{type:"doc",id:"api/mobile/type-aliases/PersistLastDeviceHandlers",label:"PersistLastDeviceHandlers"},{type:"doc",id:"api/mobile/type-aliases/ReconnectConfig",label:"ReconnectConfig"},{type:"doc",id:"api/mobile/type-aliases/ReconnectionStatus",label:"ReconnectionStatus"},{type:"doc",id:"api/mobile/type-aliases/RemoteTrack",label:"RemoteTrack"},{type:"doc",id:"api/mobile/type-aliases/RoomType",label:"RoomType"},{type:"doc",id:"api/mobile/type-aliases/RTCPIPViewProps",label:"RTCPIPViewProps"},{type:"doc",id:"api/mobile/type-aliases/RTCVideoViewProps",label:"RTCVideoViewProps"},{type:"doc",id:"api/mobile/type-aliases/SimulcastBandwidthLimit",label:"SimulcastBandwidthLimit"},{type:"doc",id:"api/mobile/type-aliases/SimulcastBandwidthLimits",label:"SimulcastBandwidthLimits"},{type:"doc",id:"api/mobile/type-aliases/StreamConfig",label:"StreamConfig"},{type:"doc",id:"api/mobile/type-aliases/StreamerInputs",label:"StreamerInputs"},{type:"doc",id:"api/mobile/type-aliases/Track",label:"Track"},{type:"doc",id:"api/mobile/type-aliases/TrackBandwidthLimit",label:"TrackBandwidthLimit"},{type:"doc",id:"api/mobile/type-aliases/TrackFields",label:"TrackFields"},{type:"doc",id:"api/mobile/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/mobile/type-aliases/TrackMiddleware",label:"TrackMiddleware"},{type:"doc",id:"api/mobile/type-aliases/TracksMiddleware",label:"TracksMiddleware"},{type:"doc",id:"api/mobile/type-aliases/TracksMiddlewareResult",label:"TracksMiddlewareResult"},{type:"doc",id:"api/mobile/type-aliases/UseAudioOutputResult",label:"UseAudioOutputResult"},{type:"doc",id:"api/mobile/type-aliases/UseCameraResult",label:"UseCameraResult"},{type:"doc",id:"api/mobile/type-aliases/UseCustomSourceResult",label:"UseCustomSourceResult"},{type:"doc",id:"api/mobile/type-aliases/UseDataChannelResult",label:"UseDataChannelResult"},{type:"doc",id:"api/mobile/type-aliases/UseInitializeDevicesParams",label:"UseInitializeDevicesParams"},{type:"doc",id:"api/mobile/type-aliases/UseInitializeDevicesReturn",label:"UseInitializeDevicesReturn"},{type:"doc",id:"api/mobile/type-aliases/UseLivestreamStreamerResult",label:"UseLivestreamStreamerResult"},{type:"doc",id:"api/mobile/type-aliases/UseLivestreamViewerResult",label:"UseLivestreamViewerResult"},{type:"doc",id:"api/mobile/type-aliases/UseMicrophoneResult",label:"UseMicrophoneResult"},{type:"doc",id:"api/mobile/type-aliases/UseSandboxProps",label:"UseSandboxProps"},{type:"doc",id:"api/mobile/type-aliases/UseScreenShareResult",label:"UseScreenShareResult"},{type:"doc",id:"api/mobile/variables/ScreenCapturePickerView",label:"ScreenCapturePickerView"},{type:"doc",id:"api/mobile/variables/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/mobile/variables/useForegroundService",label:"useForegroundService"},{type:"doc",id:"api/mobile/variables/useSandbox",label:"useSandbox"}]}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.29.0/api/mobile/variables/ScreenCapturePickerView.md b/versioned_docs/version-0.29.0/api/mobile/variables/ScreenCapturePickerView.md new file mode 100644 index 00000000..a6e889f7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/mobile/variables/ScreenCapturePickerView.md @@ -0,0 +1,5 @@ +# Variable: ScreenCapturePickerView + +> `const` **ScreenCapturePickerView**: `HostComponent` + +Defined in: react-native-webrtc/lib/typescript/ScreenCapturePickerView.d.ts:1 diff --git a/versioned_docs/version-0.26.0/api/web/variables/SimulcastConfig.md b/versioned_docs/version-0.29.0/api/mobile/variables/SimulcastConfig.md similarity index 100% rename from versioned_docs/version-0.26.0/api/web/variables/SimulcastConfig.md rename to versioned_docs/version-0.29.0/api/mobile/variables/SimulcastConfig.md diff --git a/versioned_docs/version-0.26.0/api/mobile/variables/useForegroundService.md b/versioned_docs/version-0.29.0/api/mobile/variables/useForegroundService.md similarity index 73% rename from versioned_docs/version-0.26.0/api/mobile/variables/useForegroundService.md rename to versioned_docs/version-0.29.0/api/mobile/variables/useForegroundService.md index 3b3690f7..463facab 100644 --- a/versioned_docs/version-0.26.0/api/mobile/variables/useForegroundService.md +++ b/versioned_docs/version-0.29.0/api/mobile/variables/useForegroundService.md @@ -2,7 +2,7 @@ > `const` **useForegroundService**: (`config`) => `void` = `externalUseForegroundService` -Defined in: [packages/mobile-client/src/useForegroundService.ts:47](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/mobile-client/src/useForegroundService.ts#L47) +Defined in: [mobile-client/src/useForegroundService.ts:47](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/mobile-client/src/useForegroundService.ts#L47) Hook for managing a foreground service on Android. diff --git a/versioned_docs/version-0.26.0/api/mobile/variables/useSandbox.md b/versioned_docs/version-0.29.0/api/mobile/variables/useSandbox.md similarity index 61% rename from versioned_docs/version-0.26.0/api/mobile/variables/useSandbox.md rename to versioned_docs/version-0.29.0/api/mobile/variables/useSandbox.md index db322deb..a5e903c6 100644 --- a/versioned_docs/version-0.26.0/api/mobile/variables/useSandbox.md +++ b/versioned_docs/version-0.29.0/api/mobile/variables/useSandbox.md @@ -1,14 +1,14 @@ # Variable: useSandbox() -> `const` **useSandbox**: (`props?`) => `object` +> `const` **useSandbox**: (`props`) => `object` -Defined in: packages/react-client/dist/hooks/useSandbox.d.ts:7 +Defined in: react-client/dist/hooks/useSandbox.d.ts:9 ## Parameters | Parameter | Type | | ------ | ------ | -| `props?` | [`UseSandboxProps`](../type-aliases/UseSandboxProps.md) | +| `props` | [`UseSandboxProps`](../type-aliases/UseSandboxProps.md) | ## Returns @@ -29,6 +29,34 @@ Defined in: packages/react-client/dist/hooks/useSandbox.d.ts:7 `Promise`\<\{ `room`: \{ `id`: `string`; `name`: `string`; \}; `streamerToken`: `string`; \}\> +### getSandboxMoqPublisherAccess() + +> **getSandboxMoqPublisherAccess**: (`streamName`) => `Promise`\<`MoqAccess`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `streamName` | `string` | + +#### Returns + +`Promise`\<`MoqAccess`\> + +### getSandboxMoqSubscriberAccess() + +> **getSandboxMoqSubscriberAccess**: (`streamName`) => `Promise`\<`MoqAccess`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `streamName` | `string` | + +#### Returns + +`Promise`\<`MoqAccess`\> + ### getSandboxPeerToken() > **getSandboxPeerToken**: (`roomName`, `peerName`, `roomType?`) => `Promise`\<`string`\> diff --git a/versioned_docs/version-0.26.0/api/mobile/variables/useUpdatePeerMetadata.md b/versioned_docs/version-0.29.0/api/mobile/variables/useUpdatePeerMetadata.md similarity index 88% rename from versioned_docs/version-0.26.0/api/mobile/variables/useUpdatePeerMetadata.md rename to versioned_docs/version-0.29.0/api/mobile/variables/useUpdatePeerMetadata.md index 16732fb2..1c7eb9e2 100644 --- a/versioned_docs/version-0.26.0/api/mobile/variables/useUpdatePeerMetadata.md +++ b/versioned_docs/version-0.29.0/api/mobile/variables/useUpdatePeerMetadata.md @@ -2,7 +2,7 @@ > `const` **useUpdatePeerMetadata**: \<`PeerMetadata`\>() => `object` -Defined in: packages/react-client/dist/hooks/useUpdatePeerMetadata.d.ts:8 +Defined in: react-client/dist/hooks/useUpdatePeerMetadata.d.ts:8 Hook provides a method to update the metadata of the local peer. diff --git a/versioned_docs/version-0.26.0/api/mobile/variables/useVAD.md b/versioned_docs/version-0.29.0/api/mobile/variables/useVAD.md similarity index 95% rename from versioned_docs/version-0.26.0/api/mobile/variables/useVAD.md rename to versioned_docs/version-0.29.0/api/mobile/variables/useVAD.md index 4af3ce5b..1b9f9932 100644 --- a/versioned_docs/version-0.26.0/api/mobile/variables/useVAD.md +++ b/versioned_docs/version-0.29.0/api/mobile/variables/useVAD.md @@ -2,7 +2,7 @@ > `const` **useVAD**: (`options`) => `Record`\<[`PeerId`](../type-aliases/PeerId.md), `boolean`\> -Defined in: packages/react-client/dist/hooks/useVAD.d.ts:29 +Defined in: react-client/dist/hooks/useVAD.d.ts:29 Voice activity detection. Use this hook to check if voice is detected in the audio track for given peer(s). diff --git a/versioned_docs/version-0.26.0/api/reference.md b/versioned_docs/version-0.29.0/api/reference.md similarity index 66% rename from versioned_docs/version-0.26.0/api/reference.md rename to versioned_docs/version-0.29.0/api/reference.md index a9ea6f47..e10073e1 100644 --- a/versioned_docs/version-0.26.0/api/reference.md +++ b/versioned_docs/version-0.29.0/api/reference.md @@ -32,12 +32,15 @@ The notifications can be configured using Webhook or Websocket. #### Webhook -When using webhooks for receiving notifications, the `webhookUrl` must be passed -in the `RoomConfig` options when creating a room. +When using webhooks for receiving notifications, configure your webhook URL in +the **Webhooks** tab of the [Fishjam Dashboard](https://fishjam.io/app). +Fishjam then delivers all notifications to that URL. -The HTTP POST to the `webhookUrl` uses "application/x-protobuf" content type. +The HTTP POST to your webhook URL uses "application/x-protobuf" content type. The body is binary data, that represents encoded `ServerMessage`. +Setting `batchWebhookNotifications` to `true` in the `RoomConfig` is recommended. Fishjam then coalesces several notifications into one POST: the body is still a single `ServerMessage`, but its `notification_batch` field holds a `NotificationBatch`, which carries the individual notifications as a repeated list of `ServerMessage`s (see `server_notifications.proto`). This delivers notifications faster and with fewer requests. The SDK decoders unwrap the batch for you. + For more information see also [server setup documentation](../how-to/backend/server-setup#webhooks) #### Websocket diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/agent/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/agent/index.md similarity index 100% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/agent/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/agent/index.md diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/errors/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/errors/index.md similarity index 71% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/errors/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/errors/index.md index d64a628c..bace8c6a 100644 --- a/versioned_docs/version-0.26.0/api/server-python/fishjam/errors/index.md +++ b/versioned_docs/version-0.29.0/api/server-python/fishjam/errors/index.md @@ -8,6 +8,13 @@ custom_edit_url: null +## MissingFishjamIdError +```python +class MissingFishjamIdError(ValueError): +``` +Inappropriate argument value (of correct type). + +--- ## HTTPError ```python class HTTPError(Exception): @@ -56,4 +63,11 @@ class ConflictError(HTTPError): ``` +--- +## InvalidFishjamCredentialsError +```python +class InvalidFishjamCredentialsError(HTTPError): +``` + + --- diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/events/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/events/index.md similarity index 83% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/events/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/events/index.md index 6b4c2f5d..723c4c72 100644 --- a/versioned_docs/version-0.26.0/api/server-python/fishjam/events/index.md +++ b/versioned_docs/version-0.29.0/api/server-python/fishjam/events/index.md @@ -446,6 +446,188 @@ stream_id: str ``` +#### Inherited Members +* **Message**: + * `SerializeToString` + * `parse` + * `FromString` + * `to_dict` + * `from_dict` + * `to_json` + * `from_json` + * `to_pydict` + * `from_pydict` + * `is_set` +--- +## ServerMessageStreamerConnected +```python +class ServerMessageStreamerConnected(betterproto.Message): +``` + + +### __init__ +```python +def __init__(stream_id: str = , streamer_id: str = ) +``` + + +### stream_id +```python +stream_id: str +``` + + +### streamer_id +```python +streamer_id: str +``` + + +#### Inherited Members +* **Message**: + * `SerializeToString` + * `parse` + * `FromString` + * `to_dict` + * `from_dict` + * `to_json` + * `from_json` + * `to_pydict` + * `from_pydict` + * `is_set` +--- +## ServerMessageStreamerDisconnected +```python +class ServerMessageStreamerDisconnected(betterproto.Message): +``` + + +### __init__ +```python +def __init__(stream_id: str = , streamer_id: str = ) +``` + + +### stream_id +```python +stream_id: str +``` + + +### streamer_id +```python +streamer_id: str +``` + + +#### Inherited Members +* **Message**: + * `SerializeToString` + * `parse` + * `FromString` + * `to_dict` + * `from_dict` + * `to_json` + * `from_json` + * `to_pydict` + * `from_pydict` + * `is_set` +--- +## ServerMessageChannelAdded +```python +class ServerMessageChannelAdded(betterproto.Message): +``` +Notification sent when a peer creates a channel + +### __init__ +```python +def __init__( + room_id: str = , + peer_id: str = , + component_id: str = , + channel_id: str = +) +``` + + +### room_id +```python +room_id: str +``` + + +### peer_id +```python +peer_id: str +``` + + +### component_id +```python +component_id: str +``` + + +### channel_id +```python +channel_id: str +``` + + +#### Inherited Members +* **Message**: + * `SerializeToString` + * `parse` + * `FromString` + * `to_dict` + * `from_dict` + * `to_json` + * `from_json` + * `to_pydict` + * `from_pydict` + * `is_set` +--- +## ServerMessageChannelRemoved +```python +class ServerMessageChannelRemoved(betterproto.Message): +``` +Notification sent when a peer deletes a channel + +### __init__ +```python +def __init__( + room_id: str = , + peer_id: str = , + component_id: str = , + channel_id: str = +) +``` + + +### room_id +```python +room_id: str +``` + + +### peer_id +```python +peer_id: str +``` + + +### component_id +```python +component_id: str +``` + + +### channel_id +```python +channel_id: str +``` + + #### Inherited Members * **Message**: * `SerializeToString` diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/index.md similarity index 64% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/index.md index 3e97ad8c..57115f53 100644 --- a/versioned_docs/version-0.26.0/api/server-python/fishjam/index.md +++ b/versioned_docs/version-0.29.0/api/server-python/fishjam/index.md @@ -27,10 +27,43 @@ def __init__(fishjam_id: str, management_token: str) ``` Create a FishjamClient instance. +Does not contact the Fishjam backend — use :meth:`create_and_verify` +or :meth:`check_credentials` to verify credentials live. + Args: - fishjam_id: The unique identifier for the Fishjam instance. - management_token: The token used for authenticating management operations. +### create_and_verify +```python +def create_and_verify( + cls, + *, + fishjam_id: str, + management_token: str +) -> FishjamClient +``` +Construct a FishjamClient and verify its credentials against the backend. + +Args: +- fishjam_id: The unique identifier for the Fishjam instance. +- management_token: The token used for authenticating management operations. + +Returns: +- FishjamClient: A client whose credentials have been verified. + +Raises: +- InvalidFishjamCredentialsError: If the token is rejected. + +### check_credentials +```python +def check_credentials(self) -> None +``` +Verify the management token via a single ``/validate`` call. + +Raises: +- InvalidFishjamCredentialsError: If the token is rejected. + ### create_peer ```python def create_peer( @@ -177,6 +210,25 @@ Args: Returns: - str: The generated streamer token. +### create_moq_access +```python +def create_moq_access( + self, + publish_path: str | None = None, + subscribe_path: str | None = None +) -> MoqAccess +``` +Generates MoQ relay connection details. + +Args: +- publish_path: Path the access grants publish access to. +- subscribe_path: Path the access grants subscribe access to. + +Returns: +- MoqAccess: The relay connection details, containing the +- ``connection_url`` (with the JWT embedded as a ``?jwt=`` query +- parameter) and the ``token`` itself. + ### subscribe_peer ```python def subscribe_peer(self, room_id: str, peer_id: str, target_peer_id: str) @@ -220,7 +272,7 @@ Create a FishjamNotifier instance with an ID and management token. ```python def on_server_notification( self, - handler: Union[Callable[[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamConnected, ServerMessageStreamDisconnected, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]], NoneType], Callable[[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamConnected, ServerMessageStreamDisconnected, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]], Coroutine[Any, Any, None]]] + handler: Union[Callable[[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamerConnected, ServerMessageStreamerDisconnected, ServerMessageChannelAdded, ServerMessageChannelRemoved, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]], NoneType], Callable[[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamerConnected, ServerMessageStreamerDisconnected, ServerMessageChannelAdded, ServerMessageChannelRemoved, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]], Coroutine[Any, Any, None]]] ) ``` Decorator for defining a handler for Fishjam notifications. @@ -253,23 +305,70 @@ Waits until the notifier is connected and authenticated to Fishjam. If already connected, returns immediately. +--- +## decode_server_notifications +```python +def decode_server_notifications( + binary: bytes +) -> List[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamerConnected, ServerMessageStreamerDisconnected, ServerMessageChannelAdded, ServerMessageChannelRemoved, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]] +``` +Decode a received protobuf payload into a list of notifications. + +Handles both single notifications and batches transparently: a single +notification is returned as a one-element list, a batch is unpacked into +its members (in order), and anything unsupported yields an empty list. + +The available notifications are listed in the `fishjam.events` module. + +Args: +- binary: The raw binary data received from the webhook. + +Returns: +- list[AllowedNotification]: The decoded notifications, in order. Empty + when the payload carries no supported notification. + --- ## receive_binary ```python def receive_binary( binary: bytes -) -> Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamConnected, ServerMessageStreamDisconnected, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated, NoneType] +) -> Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamerConnected, ServerMessageStreamerDisconnected, ServerMessageChannelAdded, ServerMessageChannelRemoved, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated, List[Union[ServerMessageRoomCreated, ServerMessageRoomDeleted, ServerMessageRoomCrashed, ServerMessagePeerAdded, ServerMessagePeerDeleted, ServerMessagePeerConnected, ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, ServerMessageStreamerConnected, ServerMessageStreamerDisconnected, ServerMessageChannelAdded, ServerMessageChannelRemoved, ServerMessageViewerConnected, ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated]], NoneType] ``` Transforms a received protobuf notification into a notification instance. +.. deprecated:: +- Use `decode_server_notifications` instead, which always returns a list +- and handles batched payloads with a single, consistent return type. + The available notifications are listed in `fishjam.events` module. Args: - binary: The raw binary data received from the webhook. Returns: -- AllowedNotification | None: The parsed notification object, or None if - the message type is not supported. +- AllowedNotification: A single notification when the payload carries one. +- list[AllowedNotification]: The unpacked notifications, in order, when the + payload is a batch (webhook batching enabled). +- None: When the payload is not a supported notification. + +--- +## verify_webhook_signature +```python +def verify_webhook_signature(body: bytes, signature: str, secret: str) -> bool +``` +Verify the `x-fishjam-signature-256` header of a raw webhook body. + +Accepts the `sha256=` format sent by Fishjam (the prefix is +optional) and compares in constant time. Call this with the raw request +body before passing it to `decode_server_notifications`. + +Args: +- body: The raw binary body of the webhook request. +- signature: The value of the `x-fishjam-signature-256` header. +- secret: The webhook secret configured in Fishjam. + +Returns: +- bool: True when the signature matches the body, False otherwise. --- ## PeerMetadata @@ -411,6 +510,9 @@ Attributes: - room_type: The use-case of the room. If not provided, this defaults to conference. - public: True if livestream viewers can omit specifying a token. +- batch_webhook_notifications: If true, webhook notifications for this room + are coalesced into a single NotificationBatch per HTTP send instead + of one request per notification. ### __init__ ```python @@ -419,7 +521,8 @@ def __init__( video_codec: Optional[Literal['h264', 'vp8']] = None, webhook_url: str | None = None, room_type: Literal['conference', 'audio_only', 'livestream', 'full_feature', 'broadcaster', 'audio_only_livestream'] = 'conference', - public: bool = False + public: bool = False, + batch_webhook_notifications: bool = False ) ``` @@ -459,6 +562,13 @@ public: bool = False ``` True if livestream viewers can omit specifying a token. +### batch_webhook_notifications +```python +batch_webhook_notifications: bool = False + +``` +Coalesce webhook notifications into a single NotificationBatch per send. + --- ## AgentOptions ```python @@ -662,4 +772,74 @@ additional_keys: list[str] ``` +--- +## MoqAccess +```python +class MoqAccess: +``` +Connection details for a MoQ relay client + +Attributes: +- connection_url (str): Relay connection URL with the JWT embedded as a `?jwt=` query parameter. Pass directly to + a MoQ client SDK. Example: https://relay.fishjam.io/abc123?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.... +- token (str): JWT authorizing the MoQ relay connection, also embedded in `connection_url` Example: eyJhbGciOiJIUz + I1NiIsInR5cCI6IkpXVCJ9.eyJyb290IjoiZmlzaGphbSIsInB1dCI6WyJteS1zdHJlYW0iXSwiZ2V0IjpbXSwiaWF0IjoxNzEzMzYwMDAwLCJle + HAiOjE3MTMzNjM2MDB9.abc123. + +### __init__ +```python +def __init__(connection_url: str, token: str) +``` +Method generated by attrs for class MoqAccess. + +### connection_url +```python +connection_url: str +``` + + +### token +```python +token: str +``` + + +### additional_properties +```python +additional_properties: dict[str, typing.Any] +``` + + +### to_dict +```python +def to_dict(self) -> dict[str, typing.Any] +``` + + +### from_dict +```python +def from_dict(cls: type[~T], src_dict: Mapping[str, typing.Any]) -> ~T +``` + + +### additional_keys +```python +additional_keys: list[str] +``` + + +--- +## MissingFishjamIdError +```python +class MissingFishjamIdError(ValueError): +``` +Inappropriate argument value (of correct type). + +--- +## InvalidFishjamCredentialsError +```python +class InvalidFishjamCredentialsError(fishjam.errors.HTTPError): +``` + + --- diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/integrations/gemini/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/integrations/gemini/index.md similarity index 100% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/integrations/gemini/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/integrations/gemini/index.md diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/integrations/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/integrations/index.md similarity index 100% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/integrations/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/integrations/index.md diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/peer/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/peer/index.md similarity index 100% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/peer/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/peer/index.md diff --git a/versioned_docs/version-0.26.0/api/server-python/fishjam/room/index.md b/versioned_docs/version-0.29.0/api/server-python/fishjam/room/index.md similarity index 80% rename from versioned_docs/version-0.26.0/api/server-python/fishjam/room/index.md rename to versioned_docs/version-0.29.0/api/server-python/fishjam/room/index.md index 9d2a35af..0ec8fa19 100644 --- a/versioned_docs/version-0.26.0/api/server-python/fishjam/room/index.md +++ b/versioned_docs/version-0.29.0/api/server-python/fishjam/room/index.md @@ -15,16 +15,21 @@ class RoomConfig: Room configuration Attributes: +- batch_webhook_notifications (bool | Unset): If true, webhook notifications for this room are coalesced into a + single NotificationBatch per HTTP send instead of one request per notification. VAD notifications are + unaffected. Default: False. - max_peers (int | None | Unset): Maximum amount of peers allowed into the room Example: 10. - public (bool | Unset): True if livestream viewers can omit specifying a token. Default: False. - room_type (RoomType | Unset): The use-case of the room. If not provided, this defaults to conference. - video_codec (VideoCodec | Unset): Enforces video codec for each peer in the room -- webhook_url (None | str | Unset): URL where Fishjam notifications will be sent Example: +- webhook_url (None | str | Unset): Deprecated: configure the webhook in the Dashboard instead. URL where Fishjam + notifications will be sent; overrides the Dashboard-configured webhook URL Example: https://backend.address.com/fishjam-notifications-endpoint. ### __init__ ```python def __init__( + batch_webhook_notifications: bool | Unset = False, max_peers: int | None | Unset = , public: bool | Unset = False, room_type: RoomType | Unset = , @@ -34,6 +39,12 @@ def __init__( ``` Method generated by attrs for class RoomConfig. +### batch_webhook_notifications +```python +batch_webhook_notifications: bool | Unset +``` + + ### max_peers ```python max_peers: int | None | Unset diff --git a/versioned_docs/version-0.29.0/api/server/classes/BadRequestException.md b/versioned_docs/version-0.29.0/api/server/classes/BadRequestException.md new file mode 100644 index 00000000..eee4c665 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/BadRequestException.md @@ -0,0 +1,53 @@ +# Class: BadRequestException + +Defined in: [js-server-sdk/src/exceptions/index.ts:23](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L23) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new BadRequestException**(`info`): `BadRequestException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`BadRequestException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/FishjamAgent.md b/versioned_docs/version-0.29.0/api/server/classes/FishjamAgent.md similarity index 57% rename from versioned_docs/version-0.26.0/api/server/classes/FishjamAgent.md rename to versioned_docs/version-0.29.0/api/server/classes/FishjamAgent.md index 9b655253..63a46655 100644 --- a/versioned_docs/version-0.26.0/api/server/classes/FishjamAgent.md +++ b/versioned_docs/version-0.29.0/api/server/classes/FishjamAgent.md @@ -1,6 +1,6 @@ # Class: FishjamAgent -Defined in: [js-server-sdk/src/agent.ts:50](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L50) +Defined in: [js-server-sdk/src/agent.ts:47](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L47) ## Extends @@ -10,9 +10,9 @@ Defined in: [js-server-sdk/src/agent.ts:50](https://github.com/fishjam-cloud/js- ### Constructor -> **new FishjamAgent**(`config`, `agentToken`, `callbacks?`): `FishjamAgent` +> **new FishjamAgent**(`config`, `agentToken`, `callbacks?`, `peerWebsocketUrl?`): `FishjamAgent` -Defined in: [js-server-sdk/src/agent.ts:57](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L57) +Defined in: [js-server-sdk/src/agent.ts:55](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L55) #### Parameters @@ -21,6 +21,7 @@ Defined in: [js-server-sdk/src/agent.ts:57](https://github.com/fishjam-cloud/js- | `config` | [`FishjamConfig`](../type-aliases/FishjamConfig.md) | | `agentToken` | `string` | | `callbacks?` | [`AgentCallbacks`](../type-aliases/AgentCallbacks.md) | +| `peerWebsocketUrl?` | `string` | #### Returns @@ -36,7 +37,7 @@ Defined in: [js-server-sdk/src/agent.ts:57](https://github.com/fishjam-cloud/js- > **awaitConnected**(): `Promise`\<`void`\> -Defined in: [js-server-sdk/src/agent.ts:84](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L84) +Defined in: [js-server-sdk/src/agent.ts:94](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L94) Await Agent connection to Fishjam. @@ -50,7 +51,7 @@ Await Agent connection to Fishjam. > **captureImage**(`trackId`, `timeoutMs`): `Promise`\<`AgentResponse_TrackImage`\> -Defined in: [js-server-sdk/src/agent.ts:145](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L145) +Defined in: [js-server-sdk/src/agent.ts:155](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L155) Request a captured image from the given track @@ -58,7 +59,7 @@ Request a captured image from the given track | Parameter | Type | Default value | Description | | ------ | ------ | ------ | ------ | -| `trackId` | `string` | `undefined` | the track to capture an image from | +| `trackId` | [`TrackId`](../type-aliases/TrackId.md) | `undefined` | the track to capture an image from | | `timeoutMs` | `number` | `5000` | timeout in milliseconds (default: 5000) | #### Returns @@ -73,7 +74,7 @@ a promise that resolves with the captured image data > **createTrack**(`codecParameters`, `metadata`): [`AgentTrack`](../type-aliases/AgentTrack.md) -Defined in: [js-server-sdk/src/agent.ts:92](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L92) +Defined in: [js-server-sdk/src/agent.ts:102](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L102) Creates an outgoing audio track for the agent @@ -96,7 +97,7 @@ a new audio track > **deleteTrack**(`trackId`): `void` -Defined in: [js-server-sdk/src/agent.ts:124](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L124) +Defined in: [js-server-sdk/src/agent.ts:134](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L134) Deletes an outgoing audio track for the agent @@ -116,7 +117,7 @@ Deletes an outgoing audio track for the agent > **disconnect**(): `void` -Defined in: [js-server-sdk/src/agent.ts:170](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L170) +Defined in: [js-server-sdk/src/agent.ts:180](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L180) #### Returns @@ -128,7 +129,7 @@ Defined in: [js-server-sdk/src/agent.ts:170](https://github.com/fishjam-cloud/js > **interruptTrack**(`trackId`): `void` -Defined in: [js-server-sdk/src/agent.ts:115](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L115) +Defined in: [js-server-sdk/src/agent.ts:125](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L125) Interrupt track identified by `trackId`. @@ -153,7 +154,7 @@ Audio sent after the interrupt will be played normally. > **sendData**(`trackId`, `data`): `void` -Defined in: [js-server-sdk/src/agent.ts:133](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L133) +Defined in: [js-server-sdk/src/agent.ts:143](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L143) Send audio data for the given track diff --git a/versioned_docs/version-0.29.0/api/server/classes/FishjamBaseException.md b/versioned_docs/version-0.29.0/api/server/classes/FishjamBaseException.md new file mode 100644 index 00000000..5ca85cd1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/FishjamBaseException.md @@ -0,0 +1,58 @@ +# Class: FishjamBaseException + +Defined in: [js-server-sdk/src/exceptions/index.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L13) + +## Extends + +- `Error` + +## Extended by + +- [`BadRequestException`](BadRequestException.md) +- [`UnauthorizedException`](UnauthorizedException.md) +- [`ForbiddenException`](ForbiddenException.md) +- [`RoomNotFoundException`](RoomNotFoundException.md) +- [`FishjamNotFoundException`](FishjamNotFoundException.md) +- [`InvalidFishjamCredentialsException`](InvalidFishjamCredentialsException.md) +- [`PeerNotFoundException`](PeerNotFoundException.md) +- [`ServiceUnavailableException`](ServiceUnavailableException.md) +- [`QuotaExceededException`](QuotaExceededException.md) +- [`UnknownException`](UnknownException.md) + +## Constructors + +### Constructor + +> **new FishjamBaseException**(`info`): `FishjamBaseException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`FishjamBaseException` + +#### Overrides + +`Error.constructor` + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) diff --git a/versioned_docs/version-0.26.0/api/server/classes/FishjamClient.md b/versioned_docs/version-0.29.0/api/server/classes/FishjamClient.md similarity index 56% rename from versioned_docs/version-0.26.0/api/server/classes/FishjamClient.md rename to versioned_docs/version-0.29.0/api/server/classes/FishjamClient.md index 1e21323c..5fbc9db6 100644 --- a/versioned_docs/version-0.26.0/api/server/classes/FishjamClient.md +++ b/versioned_docs/version-0.29.0/api/server/classes/FishjamClient.md @@ -1,6 +1,6 @@ # Class: FishjamClient -Defined in: [js-server-sdk/src/client.ts:22](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L22) +Defined in: [js-server-sdk/src/client.ts:26](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L26) Client class that allows to manage Rooms and Peers for a Fishjam App. It requires the Fishjam ID and management token that can be retrieved from the Fishjam Dashboard. @@ -11,10 +11,14 @@ It requires the Fishjam ID and management token that can be retrieved from the F > **new FishjamClient**(`config`): `FishjamClient` -Defined in: [js-server-sdk/src/client.ts:40](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L40) +Defined in: [js-server-sdk/src/client.ts:50](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L50) Create new instance of Fishjam Client. +Does not verify credentials against the backend — use +[FishjamClient.create](#create) or call +[FishjamClient.checkCredentials](#checkcredentials) afterwards for that. + Example usage: ``` const fishjamClient = new FishjamClient({ @@ -35,11 +39,60 @@ const fishjamClient = new FishjamClient({ ## Methods +### checkCredentials() + +> **checkCredentials**(): `Promise`\<`void`\> + +Defined in: [js-server-sdk/src/client.ts:102](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L102) + +Verifies the configured credentials by making a single lightweight +call to the Fishjam backend. Resolves on success, throws +[InvalidFishjamCredentialsException](InvalidFishjamCredentialsException.md) on 401/404 from the backend, +otherwise rethrows the standard mapped exception. + +#### Returns + +`Promise`\<`void`\> + +*** + +### create() + +> `static` **create**(`config`): `Promise`\<`FishjamClient`\> + +Defined in: [js-server-sdk/src/client.ts:90](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L90) + +Async factory: constructs a client and verifies credentials against +the backend. + +Throws [InvalidFishjamCredentialsException](InvalidFishjamCredentialsException.md) when the +`fishjamId` / `managementToken` pair is rejected by the backend. + +Example: +``` +const client = await FishjamClient.create({ + fishjamId: process.env.FISHJAM_ID!, + managementToken: process.env.FISHJAM_MANAGEMENT_TOKEN!, +}); +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`FishjamConfig`](../type-aliases/FishjamConfig.md) | + +#### Returns + +`Promise`\<`FishjamClient`\> + +*** + ### createAgent() > **createAgent**(`roomId`, `options`, `callbacks?`): `Promise`\<\{ `agent`: [`FishjamAgent`](FishjamAgent.md); `peer`: [`Peer`](../type-aliases/Peer.md); \}\> -Defined in: [js-server-sdk/src/client.ts:143](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L143) +Defined in: [js-server-sdk/src/client.ts:181](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L181) Create a new agent assigned to a room. @@ -61,7 +114,7 @@ Create a new agent assigned to a room. > **createLivestreamStreamerToken**(`roomId`): `Promise`\<[`StreamerToken`](../interfaces/StreamerToken.md)\> -Defined in: [js-server-sdk/src/client.ts:264](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L264) +Defined in: [js-server-sdk/src/client.ts:298](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L298) Creates a livestream streamer token for the given room. @@ -83,7 +136,7 @@ a livestream streamer token > **createLivestreamViewerToken**(`roomId`): `Promise`\<[`ViewerToken`](../interfaces/ViewerToken.md)\> -Defined in: [js-server-sdk/src/client.ts:251](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L251) +Defined in: [js-server-sdk/src/client.ts:286](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L286) Creates a livestream viewer token for the given room. @@ -101,11 +154,33 @@ a livestream viewer token *** +### createMoqAccess() + +> **createMoqAccess**(`config?`): `Promise`\<[`MoqAccess`](../interfaces/MoqAccess.md)\> + +Defined in: [js-server-sdk/src/client.ts:310](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L310) + +Creates MoQ access. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config?` | [`MoqAccessConfig`](../interfaces/MoqAccessConfig.md) | + +#### Returns + +`Promise`\<[`MoqAccess`](../interfaces/MoqAccess.md)\> + +connection details containing the relay URL with the JWT embedded as a `?jwt=` query parameter, and the token itself + +*** + ### createPeer() > **createPeer**(`roomId`, `options`): `Promise`\<\{ `peer`: [`Peer`](../type-aliases/Peer.md); `peerToken`: `string`; \}\> -Defined in: [js-server-sdk/src/client.ts:123](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L123) +Defined in: [js-server-sdk/src/client.ts:165](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L165) Create a new peer assigned to a room. @@ -126,7 +201,7 @@ Create a new peer assigned to a room. > **createRoom**(`config`): `Promise`\<[`Room`](../type-aliases/Room.md)\> -Defined in: [js-server-sdk/src/client.ts:81](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L81) +Defined in: [js-server-sdk/src/client.ts:130](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L130) Create a new room. All peers connected to the same room will be able to send/receive streams to each other. @@ -146,7 +221,7 @@ Create a new room. All peers connected to the same room will be able to send/rec > **createVapiAgent**(`roomId`, `options`): `Promise`\<\{ `peer`: [`Peer`](../type-aliases/Peer.md); \}\> -Defined in: [js-server-sdk/src/client.ts:169](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L169) +Defined in: [js-server-sdk/src/client.ts:204](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L204) Create a new VAPI agent assigned to a room. @@ -167,7 +242,7 @@ Create a new VAPI agent assigned to a room. > **deletePeer**(`roomId`, `peerId`): `Promise`\<`void`\> -Defined in: [js-server-sdk/src/client.ts:201](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L201) +Defined in: [js-server-sdk/src/client.ts:232](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L232) Delete a peer - this will also disconnect the peer from the room. @@ -188,7 +263,7 @@ Delete a peer - this will also disconnect the peer from the room. > **deleteRoom**(`roomId`): `Promise`\<`void`\> -Defined in: [js-server-sdk/src/client.ts:100](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L100) +Defined in: [js-server-sdk/src/client.ts:142](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L142) Delete an existing room. All peers connected to this room will be disconnected and removed. @@ -208,7 +283,7 @@ Delete an existing room. All peers connected to this room will be disconnected a > **getAllRooms**(): `Promise`\<[`Room`](../type-aliases/Room.md)[]\> -Defined in: [js-server-sdk/src/client.ts:111](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L111) +Defined in: [js-server-sdk/src/client.ts:153](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L153) Get a list of all existing rooms. @@ -222,7 +297,7 @@ Get a list of all existing rooms. > **getRoom**(`roomId`): `Promise`\<[`Room`](../type-aliases/Room.md)\> -Defined in: [js-server-sdk/src/client.ts:189](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L189) +Defined in: [js-server-sdk/src/client.ts:220](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L220) Get details about a given room. @@ -242,7 +317,7 @@ Get details about a given room. > **refreshPeerToken**(`roomId`, `peerId`): `Promise`\<`string`\> -Defined in: [js-server-sdk/src/client.ts:238](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L238) +Defined in: [js-server-sdk/src/client.ts:273](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L273) Refresh the peer token for an already existing peer. If an already created peer has not been connected to the room for more than 24 hours, the token will become invalid. This method can be used to generate a new peer token for the existing peer. @@ -266,7 +341,7 @@ refreshed peer token > **subscribePeer**(`roomId`, `subscriberPeerId`, `publisherPeerId`): `Promise`\<`void`\> -Defined in: [js-server-sdk/src/client.ts:213](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L213) +Defined in: [js-server-sdk/src/client.ts:244](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L244) Subscribe a peer to another peer - this will make all tracks from the publisher available to the subscriber. Using this function only makes sense if subscribeMode is set to manual @@ -289,7 +364,7 @@ Using this function only makes sense if subscribeMode is set to manual > **subscribeTracks**(`roomId`, `subscriberPeerId`, `tracks`): `Promise`\<`void`\> -Defined in: [js-server-sdk/src/client.ts:225](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/client.ts#L225) +Defined in: [js-server-sdk/src/client.ts:256](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/client.ts#L256) Subscribe a peer to specific tracks from another peer - this will make only the specified tracks from the publisher available to the subscriber. Using this function only makes sense if subscribeMode is set to manual diff --git a/versioned_docs/version-0.29.0/api/server/classes/FishjamNotFoundException.md b/versioned_docs/version-0.29.0/api/server/classes/FishjamNotFoundException.md new file mode 100644 index 00000000..e04256fb --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/FishjamNotFoundException.md @@ -0,0 +1,53 @@ +# Class: FishjamNotFoundException + +Defined in: [js-server-sdk/src/exceptions/index.ts:31](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L31) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new FishjamNotFoundException**(`info`): `FishjamNotFoundException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`FishjamNotFoundException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.26.0/api/server/classes/FishjamWSNotifier.md b/versioned_docs/version-0.29.0/api/server/classes/FishjamWSNotifier.md similarity index 51% rename from versioned_docs/version-0.26.0/api/server/classes/FishjamWSNotifier.md rename to versioned_docs/version-0.29.0/api/server/classes/FishjamWSNotifier.md index 7f97a965..dadeb765 100644 --- a/versioned_docs/version-0.26.0/api/server/classes/FishjamWSNotifier.md +++ b/versioned_docs/version-0.29.0/api/server/classes/FishjamWSNotifier.md @@ -1,6 +1,6 @@ # Class: FishjamWSNotifier -Defined in: [js-server-sdk/src/ws\_notifier.ts:76](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L76) +Defined in: [js-server-sdk/src/ws\_notifier.ts:12](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/ws_notifier.ts#L12) Notifier object that can be used to get notified about various events related to the Fishjam App. @@ -14,7 +14,7 @@ Notifier object that can be used to get notified about various events related to > **new FishjamWSNotifier**(`config`, `onError`, `onClose`): `FishjamWSNotifier` -Defined in: [js-server-sdk/src/ws\_notifier.ts:79](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/ws_notifier.ts#L79) +Defined in: [js-server-sdk/src/ws\_notifier.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/ws_notifier.ts#L15) #### Parameters @@ -31,3 +31,17 @@ Defined in: [js-server-sdk/src/ws\_notifier.ts:79](https://github.com/fishjam-cl #### Overrides `(EventEmitter as new () => TypedEmitter).constructor` + +## Methods + +### disconnect() + +> **disconnect**(): `void` + +Defined in: [js-server-sdk/src/ws\_notifier.ts:34](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/ws_notifier.ts#L34) + +Close the underlying WebSocket and stop emitting notifications. + +#### Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/server/classes/ForbiddenException.md b/versioned_docs/version-0.29.0/api/server/classes/ForbiddenException.md new file mode 100644 index 00000000..8877edfd --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/ForbiddenException.md @@ -0,0 +1,53 @@ +# Class: ForbiddenException + +Defined in: [js-server-sdk/src/exceptions/index.ts:27](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L27) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new ForbiddenException**(`info`): `ForbiddenException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`ForbiddenException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/InvalidFishjamCredentialsException.md b/versioned_docs/version-0.29.0/api/server/classes/InvalidFishjamCredentialsException.md new file mode 100644 index 00000000..38c7a73b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/InvalidFishjamCredentialsException.md @@ -0,0 +1,53 @@ +# Class: InvalidFishjamCredentialsException + +Defined in: [js-server-sdk/src/exceptions/index.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L33) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new InvalidFishjamCredentialsException**(`info`): `InvalidFishjamCredentialsException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`InvalidFishjamCredentialsException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/MissingFishjamIdException.md b/versioned_docs/version-0.29.0/api/server/classes/MissingFishjamIdException.md new file mode 100644 index 00000000..9004b766 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/MissingFishjamIdException.md @@ -0,0 +1,23 @@ +# Class: MissingFishjamIdException + +Defined in: [js-server-sdk/src/exceptions/index.ts:1](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L1) + +## Extends + +- `Error` + +## Constructors + +### Constructor + +> **new MissingFishjamIdException**(): `MissingFishjamIdException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:2](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L2) + +#### Returns + +`MissingFishjamIdException` + +#### Overrides + +`Error.constructor` diff --git a/versioned_docs/version-0.29.0/api/server/classes/PeerNotFoundException.md b/versioned_docs/version-0.29.0/api/server/classes/PeerNotFoundException.md new file mode 100644 index 00000000..89232595 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/PeerNotFoundException.md @@ -0,0 +1,53 @@ +# Class: PeerNotFoundException + +Defined in: [js-server-sdk/src/exceptions/index.ts:35](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L35) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new PeerNotFoundException**(`info`): `PeerNotFoundException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`PeerNotFoundException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/QuotaExceededException.md b/versioned_docs/version-0.29.0/api/server/classes/QuotaExceededException.md new file mode 100644 index 00000000..7dbd1e2c --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/QuotaExceededException.md @@ -0,0 +1,53 @@ +# Class: QuotaExceededException + +Defined in: [js-server-sdk/src/exceptions/index.ts:39](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L39) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new QuotaExceededException**(`info`): `QuotaExceededException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`QuotaExceededException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/RoomNotFoundException.md b/versioned_docs/version-0.29.0/api/server/classes/RoomNotFoundException.md new file mode 100644 index 00000000..b6981a4e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/RoomNotFoundException.md @@ -0,0 +1,53 @@ +# Class: RoomNotFoundException + +Defined in: [js-server-sdk/src/exceptions/index.ts:29](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L29) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new RoomNotFoundException**(`info`): `RoomNotFoundException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`RoomNotFoundException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/ServiceUnavailableException.md b/versioned_docs/version-0.29.0/api/server/classes/ServiceUnavailableException.md new file mode 100644 index 00000000..0d88bdad --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/ServiceUnavailableException.md @@ -0,0 +1,53 @@ +# Class: ServiceUnavailableException + +Defined in: [js-server-sdk/src/exceptions/index.ts:37](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L37) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new ServiceUnavailableException**(`info`): `ServiceUnavailableException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`ServiceUnavailableException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/UnauthorizedException.md b/versioned_docs/version-0.29.0/api/server/classes/UnauthorizedException.md new file mode 100644 index 00000000..e20281b6 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/UnauthorizedException.md @@ -0,0 +1,53 @@ +# Class: UnauthorizedException + +Defined in: [js-server-sdk/src/exceptions/index.ts:25](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L25) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new UnauthorizedException**(`info`): `UnauthorizedException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`UnauthorizedException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/classes/UnknownException.md b/versioned_docs/version-0.29.0/api/server/classes/UnknownException.md new file mode 100644 index 00000000..9852ec6d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/classes/UnknownException.md @@ -0,0 +1,53 @@ +# Class: UnknownException + +Defined in: [js-server-sdk/src/exceptions/index.ts:41](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L41) + +## Extends + +- [`FishjamBaseException`](FishjamBaseException.md) + +## Constructors + +### Constructor + +> **new UnknownException**(`info`): `UnknownException` + +Defined in: [js-server-sdk/src/exceptions/index.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | [`FishjamExceptionInfo`](../interfaces/FishjamExceptionInfo.md) | + +#### Returns + +`UnknownException` + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`constructor`](FishjamBaseException.md#constructor) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L15) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`details`](FishjamBaseException.md#details) + +*** + +### statusCode + +> **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L14) + +#### Inherited from + +[`FishjamBaseException`](FishjamBaseException.md).[`statusCode`](FishjamBaseException.md#statuscode) diff --git a/versioned_docs/version-0.29.0/api/server/functions/decodeServerNotifications.md b/versioned_docs/version-0.29.0/api/server/functions/decodeServerNotifications.md new file mode 100644 index 00000000..bd77c643 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/functions/decodeServerNotifications.md @@ -0,0 +1,41 @@ +# Function: decodeServerNotifications() + +> **decodeServerNotifications**(`data`): [`ServerNotification`](../type-aliases/ServerNotification.md)[] + +Defined in: [js-server-sdk/src/webhook.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/webhook.ts#L33) + +Decode a raw Fishjam webhook body (`application/x-protobuf`) into typed, +mapped notifications. + +A room/stream created with `batchWebhookNotifications: true` may deliver +several notifications coalesced into a single `NotificationBatch`; this helper +transparently unwraps that batch, so a single message and a batch are handled +the same way. Notifications are returned in wire order, with the same payload +mapping the [FishjamWSNotifier](../classes/FishjamWSNotifier.md) applies (branded ids, `peerType`/`track` +enums). Non-surfaced variants (handshake, deprecated) are omitted. + +Accepts a Node `Buffer` (a `Uint8Array` subclass), a `Uint8Array`, or an +`ArrayBuffer`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | `ArrayBuffer` \| `Uint8Array`\<`ArrayBufferLike`\> | + +## Returns + +[`ServerNotification`](../type-aliases/ServerNotification.md)[] + +## Example + +```ts +import { decodeServerNotifications } from '@fishjam-cloud/js-server-sdk'; + +declare const body: Uint8Array; +declare const handlePeerConnected: (notification: unknown) => void; +// ---cut--- +for (const { type, notification } of decodeServerNotifications(body)) { + if (type === 'peerConnected') handlePeerConnected(notification); +} +``` diff --git a/versioned_docs/version-0.29.0/api/server/functions/verifyWebhookSignature.md b/versioned_docs/version-0.29.0/api/server/functions/verifyWebhookSignature.md new file mode 100644 index 00000000..0a0a6747 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/functions/verifyWebhookSignature.md @@ -0,0 +1,41 @@ +# Function: verifyWebhookSignature() + +> **verifyWebhookSignature**(`body`, `signature`, `secret`): `boolean` + +Defined in: [js-server-sdk/src/webhook.ts:61](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/webhook.ts#L61) + +Verify the signature of a raw Fishjam webhook request. + +Fishjam signs each webhook delivery with the room's signing secret and sends +the result in the `x-fishjam-signature-256` header as +`sha256=`. Pass the raw, +not-yet-decoded request body, the header value, and your secret; the comparison +is constant-time (signatures of the wrong length are rejected early, which +leaks only the expected signature length — public knowledge for SHA-256). +Verify before calling [decodeServerNotifications](decodeServerNotifications.md). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `body` | `ArrayBuffer` \| `Uint8Array`\<`ArrayBufferLike`\> | +| `signature` | `string` | +| `secret` | `string` | + +## Returns + +`boolean` + +## Example + +```ts +import { verifyWebhookSignature, decodeServerNotifications } from '@fishjam-cloud/js-server-sdk'; + +declare const body: Uint8Array; +declare const signatureHeader: string; +// ---cut--- +if (!verifyWebhookSignature(body, signatureHeader, process.env.WEBHOOK_SECRET!)) { + throw new Error('Invalid webhook signature'); +} +const notifications = decodeServerNotifications(body); +``` diff --git a/versioned_docs/version-0.26.0/api/server/index.md b/versioned_docs/version-0.29.0/api/server/index.md similarity index 69% rename from versioned_docs/version-0.26.0/api/server/index.md rename to versioned_docs/version-0.29.0/api/server/index.md index 7e0409dd..b7c2c56f 100644 --- a/versioned_docs/version-0.26.0/api/server/index.md +++ b/versioned_docs/version-0.29.0/api/server/index.md @@ -7,22 +7,29 @@ Server-side Node.js SDK for creating and managing Fishjam rooms, peers, agents, - [FishjamClient](classes/FishjamClient.md) - [FishjamWSNotifier](classes/FishjamWSNotifier.md) +## Notifications + +- [decodeServerNotifications](functions/decodeServerNotifications.md) +- [verifyWebhookSignature](functions/verifyWebhookSignature.md) + ## Other -- [PeerStatus](enumerations/PeerStatus.md) -- [RoomType](enumerations/RoomType.md) -- [VideoCodec](enumerations/VideoCodec.md) - [BadRequestException](classes/BadRequestException.md) - [FishjamAgent](classes/FishjamAgent.md) - [FishjamBaseException](classes/FishjamBaseException.md) - [FishjamNotFoundException](classes/FishjamNotFoundException.md) - [ForbiddenException](classes/ForbiddenException.md) +- [InvalidFishjamCredentialsException](classes/InvalidFishjamCredentialsException.md) - [MissingFishjamIdException](classes/MissingFishjamIdException.md) - [PeerNotFoundException](classes/PeerNotFoundException.md) +- [QuotaExceededException](classes/QuotaExceededException.md) - [RoomNotFoundException](classes/RoomNotFoundException.md) - [ServiceUnavailableException](classes/ServiceUnavailableException.md) - [UnauthorizedException](classes/UnauthorizedException.md) - [UnknownException](classes/UnknownException.md) +- [FishjamExceptionInfo](interfaces/FishjamExceptionInfo.md) +- [MoqAccess](interfaces/MoqAccess.md) +- [MoqAccessConfig](interfaces/MoqAccessConfig.md) - [PeerOptionsAgent](interfaces/PeerOptionsAgent.md) - [PeerOptionsVapi](interfaces/PeerOptionsVapi.md) - [PeerOptionsWebRTC](interfaces/PeerOptionsWebRTC.md) @@ -35,15 +42,19 @@ Server-side Node.js SDK for creating and managing Fishjam rooms, peers, agents, - [AgentTrack](type-aliases/AgentTrack.md) - [AudioCodecParameters](type-aliases/AudioCodecParameters.md) - [Brand](type-aliases/Brand.md) +- [ChannelAdded](type-aliases/ChannelAdded.md) +- [ChannelRemoved](type-aliases/ChannelRemoved.md) - [CloseEventHandler](type-aliases/CloseEventHandler.md) - [ErrorEventHandler](type-aliases/ErrorEventHandler.md) - [ExpectedAgentEvents](type-aliases/ExpectedAgentEvents.md) - [ExpectedEvents](type-aliases/ExpectedEvents.md) - [FishjamConfig](type-aliases/FishjamConfig.md) +- [IgnoredEvents](type-aliases/IgnoredEvents.md) - [IncomingTrackData](type-aliases/IncomingTrackData.md) - [IncomingTrackImage](type-aliases/IncomingTrackImage.md) - [NotificationEvents](type-aliases/NotificationEvents.md) - [OutgoingTrackData](type-aliases/OutgoingTrackData.md) +- [Override](type-aliases/Override.md) - [Peer](type-aliases/Peer.md) - [PeerAdded](type-aliases/PeerAdded.md) - [PeerConnected](type-aliases/PeerConnected.md) @@ -53,18 +64,31 @@ Server-side Node.js SDK for creating and managing Fishjam rooms, peers, agents, - [PeerId](type-aliases/PeerId.md) - [PeerMetadataUpdated](type-aliases/PeerMetadataUpdated.md) - [PeerOptions](type-aliases/PeerOptions.md) +- [PeerStatus](type-aliases/PeerStatus.md) +- [PeerType](type-aliases/PeerType.md) - [Room](type-aliases/Room.md) - [RoomCrashed](type-aliases/RoomCrashed.md) - [RoomCreated](type-aliases/RoomCreated.md) - [RoomDeleted](type-aliases/RoomDeleted.md) - [RoomId](type-aliases/RoomId.md) -- [StreamConnected](type-aliases/StreamConnected.md) -- [StreamDisconnected](type-aliases/StreamDisconnected.md) +- [RoomType](type-aliases/RoomType.md) +- [ServerNotification](type-aliases/ServerNotification.md) +- [StreamerConnected](type-aliases/StreamerConnected.md) +- [StreamerDisconnected](type-aliases/StreamerDisconnected.md) +- [Track](type-aliases/Track.md) - [TrackAdded](type-aliases/TrackAdded.md) +- [TrackForwarding](type-aliases/TrackForwarding.md) +- [TrackForwardingRemoved](type-aliases/TrackForwardingRemoved.md) - [TrackId](type-aliases/TrackId.md) - [TrackMetadataUpdated](type-aliases/TrackMetadataUpdated.md) - [TrackRemoved](type-aliases/TrackRemoved.md) - [TrackType](type-aliases/TrackType.md) +- [VadNotification](type-aliases/VadNotification.md) +- [VadStatus](type-aliases/VadStatus.md) +- [VideoCodec](type-aliases/VideoCodec.md) - [ViewerConnected](type-aliases/ViewerConnected.md) - [ViewerDisconnected](type-aliases/ViewerDisconnected.md) +- [PeerStatus](variables/PeerStatus.md) +- [RoomType](variables/RoomType.md) - [ServerMessage](variables/ServerMessage.md) +- [VideoCodec](variables/VideoCodec.md) diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/FishjamExceptionInfo.md b/versioned_docs/version-0.29.0/api/server/interfaces/FishjamExceptionInfo.md new file mode 100644 index 00000000..74eb4d70 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/FishjamExceptionInfo.md @@ -0,0 +1,27 @@ +# Interface: FishjamExceptionInfo + +Defined in: [js-server-sdk/src/exceptions/index.ts:7](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L7) + +## Properties + +### details? + +> `optional` **details**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:10](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L10) + +*** + +### message + +> **message**: `string` + +Defined in: [js-server-sdk/src/exceptions/index.ts:8](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L8) + +*** + +### statusCode? + +> `optional` **statusCode**: `number` + +Defined in: [js-server-sdk/src/exceptions/index.ts:9](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/exceptions/index.ts#L9) diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccess.md b/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccess.md new file mode 100644 index 00000000..10d48953 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccess.md @@ -0,0 +1,37 @@ +# Interface: MoqAccess + +Defined in: fishjam-openapi/dist/index.d.ts:234 + +Connection details for a MoQ relay client + +## Export + +MoqAccess + +## Properties + +### connection\_url + +> **connection\_url**: `string` + +Defined in: fishjam-openapi/dist/index.d.ts:240 + +Relay connection URL with the JWT embedded as a `?jwt=` query parameter. Pass directly to a MoQ client SDK. + +#### Memberof + +MoqAccess + +*** + +### token + +> **token**: `string` + +Defined in: fishjam-openapi/dist/index.d.ts:246 + +JWT authorizing the MoQ relay connection, also embedded in `connection_url` + +#### Memberof + +MoqAccess diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccessConfig.md b/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccessConfig.md new file mode 100644 index 00000000..61c192f0 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/MoqAccessConfig.md @@ -0,0 +1,37 @@ +# Interface: MoqAccessConfig + +Defined in: fishjam-openapi/dist/index.d.ts:273 + +MoQ access configuration + +## Export + +MoqAccessConfig + +## Properties + +### publishPath? + +> `optional` **publishPath**: `null` \| `string` + +Defined in: fishjam-openapi/dist/index.d.ts:279 + +Path under the root the token grants publish access to + +#### Memberof + +MoqAccessConfig + +*** + +### subscribePath? + +> `optional` **subscribePath**: `null` \| `string` + +Defined in: fishjam-openapi/dist/index.d.ts:285 + +Path under the root the token grants subscribe access to + +#### Memberof + +MoqAccessConfig diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsAgent.md b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsAgent.md similarity index 68% rename from versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsAgent.md rename to versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsAgent.md index f3ad16d0..588fece4 100644 --- a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsAgent.md +++ b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsAgent.md @@ -1,6 +1,6 @@ # Interface: PeerOptionsAgent -Defined in: fishjam-openapi/dist/index.d.ts:316 +Defined in: fishjam-openapi/dist/index.d.ts:789 Options specific to the Agent peer @@ -14,7 +14,7 @@ PeerOptionsAgent > `optional` **output**: `AgentOutput` -Defined in: fishjam-openapi/dist/index.d.ts:322 +Defined in: fishjam-openapi/dist/index.d.ts:795 #### Memberof @@ -26,7 +26,7 @@ PeerOptionsAgent > `optional` **subscribeMode**: `SubscribeMode` -Defined in: fishjam-openapi/dist/index.d.ts:328 +Defined in: fishjam-openapi/dist/index.d.ts:801 #### Memberof diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsVapi.md b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsVapi.md similarity index 66% rename from versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsVapi.md rename to versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsVapi.md index 5bf490d3..2f6caf3c 100644 --- a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsVapi.md +++ b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsVapi.md @@ -1,6 +1,6 @@ # Interface: PeerOptionsVapi -Defined in: fishjam-openapi/dist/index.d.ts:335 +Defined in: fishjam-openapi/dist/index.d.ts:876 Options specific to the VAPI peer @@ -14,7 +14,7 @@ PeerOptionsVapi > **apiKey**: `string` -Defined in: fishjam-openapi/dist/index.d.ts:341 +Defined in: fishjam-openapi/dist/index.d.ts:882 VAPI API key @@ -28,7 +28,7 @@ PeerOptionsVapi > **callId**: `string` -Defined in: fishjam-openapi/dist/index.d.ts:347 +Defined in: fishjam-openapi/dist/index.d.ts:888 VAPI call ID @@ -42,7 +42,7 @@ PeerOptionsVapi > `optional` **subscribeMode**: `SubscribeMode` -Defined in: fishjam-openapi/dist/index.d.ts:353 +Defined in: fishjam-openapi/dist/index.d.ts:894 #### Memberof diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsWebRTC.md b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsWebRTC.md similarity index 72% rename from versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsWebRTC.md rename to versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsWebRTC.md index aba7b273..e11ec16e 100644 --- a/versioned_docs/version-0.26.0/api/server/interfaces/PeerOptionsWebRTC.md +++ b/versioned_docs/version-0.29.0/api/server/interfaces/PeerOptionsWebRTC.md @@ -1,6 +1,6 @@ # Interface: PeerOptionsWebRTC -Defined in: fishjam-openapi/dist/index.d.ts:360 +Defined in: fishjam-openapi/dist/index.d.ts:969 Options specific to the WebRTC peer @@ -14,7 +14,7 @@ PeerOptionsWebRTC > `optional` **metadata**: `object` -Defined in: fishjam-openapi/dist/index.d.ts:366 +Defined in: fishjam-openapi/dist/index.d.ts:975 Custom peer metadata @@ -32,7 +32,7 @@ PeerOptionsWebRTC > `optional` **subscribeMode**: `SubscribeMode` -Defined in: fishjam-openapi/dist/index.d.ts:374 +Defined in: fishjam-openapi/dist/index.d.ts:983 #### Memberof diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/RoomConfig.md b/versioned_docs/version-0.29.0/api/server/interfaces/RoomConfig.md new file mode 100644 index 00000000..229b7894 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/RoomConfig.md @@ -0,0 +1,91 @@ +# Interface: RoomConfig + +Defined in: fishjam-openapi/dist/index.d.ts:1524 + +Room configuration + +## Export + +RoomConfig + +## Properties + +### batchWebhookNotifications? + +> `optional` **batchWebhookNotifications**: `boolean` + +Defined in: fishjam-openapi/dist/index.d.ts:1530 + +If true, webhook notifications for this room are coalesced into a single NotificationBatch per HTTP send instead of one request per notification. VAD notifications are unaffected. + +#### Memberof + +RoomConfig + +*** + +### maxPeers? + +> `optional` **maxPeers**: `null` \| `number` + +Defined in: fishjam-openapi/dist/index.d.ts:1536 + +Maximum amount of peers allowed into the room + +#### Memberof + +RoomConfig + +*** + +### public? + +> `optional` **public**: `boolean` + +Defined in: fishjam-openapi/dist/index.d.ts:1542 + +True if livestream viewers can omit specifying a token. + +#### Memberof + +RoomConfig + +*** + +### roomType? + +> `optional` **roomType**: [`RoomType`](../type-aliases/RoomType.md) + +Defined in: fishjam-openapi/dist/index.d.ts:1548 + +#### Memberof + +RoomConfig + +*** + +### videoCodec? + +> `optional` **videoCodec**: [`VideoCodec`](../type-aliases/VideoCodec.md) + +Defined in: fishjam-openapi/dist/index.d.ts:1554 + +#### Memberof + +RoomConfig + +*** + +### ~~webhookUrl?~~ + +> `optional` **webhookUrl**: `null` \| `string` + +Defined in: fishjam-openapi/dist/index.d.ts:1561 + +Deprecated: configure the webhook in the Dashboard instead. URL where Fishjam notifications will be sent; overrides the Dashboard-configured webhook URL + +#### Memberof + +RoomConfig + +#### Deprecated diff --git a/versioned_docs/version-0.26.0/api/server/interfaces/ServerMessage.md b/versioned_docs/version-0.29.0/api/server/interfaces/ServerMessage.md similarity index 96% rename from versioned_docs/version-0.26.0/api/server/interfaces/ServerMessage.md rename to versioned_docs/version-0.29.0/api/server/interfaces/ServerMessage.md index 8e7ec6db..4ebe4f81 100644 --- a/versioned_docs/version-0.26.0/api/server/interfaces/ServerMessage.md +++ b/versioned_docs/version-0.29.0/api/server/interfaces/ServerMessage.md @@ -42,7 +42,7 @@ Defined in: fishjam-proto/dist/index.d.ts:90 > `optional` **componentCrashed**: `ServerMessage_ComponentCrashed` -Defined in: fishjam-proto/dist/index.d.ts:109 +Defined in: fishjam-proto/dist/index.d.ts:111 #### Deprecated @@ -52,7 +52,7 @@ Defined in: fishjam-proto/dist/index.d.ts:109 > `optional` **hlsPlayable**: `ServerMessage_HlsPlayable` -Defined in: fishjam-proto/dist/index.d.ts:103 +Defined in: fishjam-proto/dist/index.d.ts:105 #### Deprecated @@ -62,7 +62,7 @@ Defined in: fishjam-proto/dist/index.d.ts:103 > `optional` **hlsUploadCrashed**: `ServerMessage_HlsUploadCrashed` -Defined in: fishjam-proto/dist/index.d.ts:107 +Defined in: fishjam-proto/dist/index.d.ts:109 #### Deprecated @@ -72,12 +72,22 @@ Defined in: fishjam-proto/dist/index.d.ts:107 > `optional` **hlsUploaded**: `ServerMessage_HlsUploaded` -Defined in: fishjam-proto/dist/index.d.ts:105 +Defined in: fishjam-proto/dist/index.d.ts:107 #### Deprecated *** +### notificationBatch? + +> `optional` **notificationBatch**: `ServerMessage_NotificationBatch` + +Defined in: fishjam-proto/dist/index.d.ts:99 + +Batch + +*** + ### peerAdded? > `optional` **peerAdded**: `ServerMessage_PeerAdded` @@ -154,7 +164,7 @@ Defined in: fishjam-proto/dist/index.d.ts:78 > `optional` **streamConnected**: `ServerMessage_StreamConnected` -Defined in: fishjam-proto/dist/index.d.ts:99 +Defined in: fishjam-proto/dist/index.d.ts:101 #### Deprecated @@ -164,7 +174,7 @@ Defined in: fishjam-proto/dist/index.d.ts:99 > `optional` **streamDisconnected**: `ServerMessage_StreamDisconnected` -Defined in: fishjam-proto/dist/index.d.ts:101 +Defined in: fishjam-proto/dist/index.d.ts:103 #### Deprecated diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/StreamerToken.md b/versioned_docs/version-0.29.0/api/server/interfaces/StreamerToken.md new file mode 100644 index 00000000..e148b1d2 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/StreamerToken.md @@ -0,0 +1,23 @@ +# Interface: StreamerToken + +Defined in: fishjam-openapi/dist/index.d.ts:2162 + +Streamer authorization token + +## Export + +StreamerToken + +## Properties + +### token + +> **token**: `string` + +Defined in: fishjam-openapi/dist/index.d.ts:2168 + +Token streamer should authorize with + +#### Memberof + +StreamerToken diff --git a/versioned_docs/version-0.29.0/api/server/interfaces/ViewerToken.md b/versioned_docs/version-0.29.0/api/server/interfaces/ViewerToken.md new file mode 100644 index 00000000..9f8db98b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/interfaces/ViewerToken.md @@ -0,0 +1,23 @@ +# Interface: ViewerToken + +Defined in: fishjam-openapi/dist/index.d.ts:2674 + +Viewer authorization token + +## Export + +ViewerToken + +## Properties + +### token + +> **token**: `string` + +Defined in: fishjam-openapi/dist/index.d.ts:2680 + +Token viewer should authorize with + +#### Memberof + +ViewerToken diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/AgentCallbacks.md b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentCallbacks.md new file mode 100644 index 00000000..59774fa5 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentCallbacks.md @@ -0,0 +1,21 @@ +# Type Alias: AgentCallbacks + +> **AgentCallbacks** = `object` + +Defined in: [js-server-sdk/src/types.ts:84](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L84) + +## Properties + +### onClose? + +> `optional` **onClose**: [`CloseEventHandler`](CloseEventHandler.md) + +Defined in: [js-server-sdk/src/types.ts:86](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L86) + +*** + +### onError? + +> `optional` **onError**: [`ErrorEventHandler`](ErrorEventHandler.md) + +Defined in: [js-server-sdk/src/types.ts:85](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L85) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/AgentEvents.md b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentEvents.md new file mode 100644 index 00000000..3d059ba8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentEvents.md @@ -0,0 +1,5 @@ +# Type Alias: AgentEvents + +> **AgentEvents** = `{ [K in ExpectedAgentEvents]: (message: Override, { peerId: PeerId }>) => void }` + +Defined in: [js-server-sdk/src/agent.ts:43](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L43) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/AgentTrack.md b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentTrack.md new file mode 100644 index 00000000..d6d7b462 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/AgentTrack.md @@ -0,0 +1,5 @@ +# Type Alias: AgentTrack + +> **AgentTrack** = [`Override`](Override.md)\<`ProtoTrack`, \{ `id`: [`TrackId`](TrackId.md); \}\> + +Defined in: [js-server-sdk/src/agent.ts:28](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L28) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/AudioCodecParameters.md b/versioned_docs/version-0.29.0/api/server/type-aliases/AudioCodecParameters.md new file mode 100644 index 00000000..16daad1e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/AudioCodecParameters.md @@ -0,0 +1,29 @@ +# Type Alias: AudioCodecParameters + +> **AudioCodecParameters** = `object` + +Defined in: [js-server-sdk/src/agent.ts:30](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L30) + +## Properties + +### channels + +> **channels**: `1` + +Defined in: [js-server-sdk/src/agent.ts:33](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L33) + +*** + +### encoding + +> **encoding**: `"opus"` \| `"pcm16"` + +Defined in: [js-server-sdk/src/agent.ts:31](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L31) + +*** + +### sampleRate + +> **sampleRate**: `16000` \| `24000` \| `48000` + +Defined in: [js-server-sdk/src/agent.ts:32](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L32) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/Brand.md b/versioned_docs/version-0.29.0/api/server/type-aliases/Brand.md similarity index 58% rename from versioned_docs/version-0.26.0/api/server/type-aliases/Brand.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/Brand.md index ff653002..15826daa 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/Brand.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/Brand.md @@ -2,7 +2,7 @@ > **Brand**\<`T`, `TBrand`\> = `T` & `object` -Defined in: [js-server-sdk/src/types.ts:8](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L8) +Defined in: [js-server-sdk/src/types.ts:13](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L13) Branded type helper diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelAdded.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelAdded.md new file mode 100644 index 00000000..03752700 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelAdded.md @@ -0,0 +1,5 @@ +# Type Alias: ChannelAdded + +> **ChannelAdded** = `object`\[`"channelAdded"`\] + +Defined in: [js-server-sdk/src/notifications.ts:159](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L159) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelRemoved.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelRemoved.md new file mode 100644 index 00000000..8e476e2e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ChannelRemoved.md @@ -0,0 +1,5 @@ +# Type Alias: ChannelRemoved + +> **ChannelRemoved** = `object`\[`"channelRemoved"`\] + +Defined in: [js-server-sdk/src/notifications.ts:160](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L160) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/CloseEventHandler.md b/versioned_docs/version-0.29.0/api/server/type-aliases/CloseEventHandler.md similarity index 54% rename from versioned_docs/version-0.26.0/api/server/type-aliases/CloseEventHandler.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/CloseEventHandler.md index eb044f9b..3d3bf0de 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/CloseEventHandler.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/CloseEventHandler.md @@ -2,7 +2,7 @@ > **CloseEventHandler** = (`code`, `reason`) => `void` -Defined in: [js-server-sdk/src/types.ts:44](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L44) +Defined in: [js-server-sdk/src/types.ts:82](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L82) ## Parameters diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ErrorEventHandler.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ErrorEventHandler.md new file mode 100644 index 00000000..f1023a09 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ErrorEventHandler.md @@ -0,0 +1,15 @@ +# Type Alias: ErrorEventHandler() + +> **ErrorEventHandler** = (`msg`) => `void` + +Defined in: [js-server-sdk/src/types.ts:81](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L81) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `msg` | `Event` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedAgentEvents.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedAgentEvents.md similarity index 55% rename from versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedAgentEvents.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedAgentEvents.md index adb3027a..91566320 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/ExpectedAgentEvents.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedAgentEvents.md @@ -2,4 +2,4 @@ > **ExpectedAgentEvents** = `"trackData"` -Defined in: [js-server-sdk/src/agent.ts:22](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L22) +Defined in: [js-server-sdk/src/agent.ts:22](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L22) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedEvents.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedEvents.md new file mode 100644 index 00000000..30c064ee --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ExpectedEvents.md @@ -0,0 +1,5 @@ +# Type Alias: ExpectedEvents + +> **ExpectedEvents** = *typeof* `expectedEventsList`\[`number`\] + +Defined in: [js-server-sdk/src/notifications.ts:67](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L67) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/FishjamConfig.md b/versioned_docs/version-0.29.0/api/server/type-aliases/FishjamConfig.md new file mode 100644 index 00000000..81a01a7c --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/FishjamConfig.md @@ -0,0 +1,21 @@ +# Type Alias: FishjamConfig + +> **FishjamConfig** = `object` + +Defined in: [js-server-sdk/src/types.ts:66](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L66) + +## Properties + +### fishjamId + +> **fishjamId**: `string` + +Defined in: [js-server-sdk/src/types.ts:71](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L71) + +*** + +### managementToken + +> **managementToken**: `string` + +Defined in: [js-server-sdk/src/types.ts:77](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L77) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/IgnoredEvents.md b/versioned_docs/version-0.29.0/api/server/type-aliases/IgnoredEvents.md new file mode 100644 index 00000000..3f5b1093 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/IgnoredEvents.md @@ -0,0 +1,5 @@ +# Type Alias: IgnoredEvents + +> **IgnoredEvents** = *typeof* `ignoredEventsList`\[`number`\] + +Defined in: [js-server-sdk/src/notifications.ts:91](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L91) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackData.md b/versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackData.md new file mode 100644 index 00000000..22dd7931 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackData.md @@ -0,0 +1,5 @@ +# Type Alias: IncomingTrackData + +> **IncomingTrackData** = [`Override`](Override.md)\<`NonNullable`\<`AgentResponse_TrackData`\>, \{ `peerId`: [`PeerId`](PeerId.md); \}\> + +Defined in: [js-server-sdk/src/agent.ts:24](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L24) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackImage.md b/versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackImage.md similarity index 59% rename from versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackImage.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackImage.md index a47ef0cc..d0c799b3 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/IncomingTrackImage.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/IncomingTrackImage.md @@ -2,4 +2,4 @@ > **IncomingTrackImage** = `NonNullable`\<`AgentResponse_TrackImage`\> -Defined in: [js-server-sdk/src/agent.ts:25](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/agent.ts#L25) +Defined in: [js-server-sdk/src/agent.ts:25](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L25) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/NotificationEvents.md b/versioned_docs/version-0.29.0/api/server/type-aliases/NotificationEvents.md new file mode 100644 index 00000000..9d4185af --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/NotificationEvents.md @@ -0,0 +1,5 @@ +# Type Alias: NotificationEvents + +> **NotificationEvents** = `{ [K in ExpectedEvents]: (message: { channelAdded: Notification<"channelAdded">; channelRemoved: Notification<"channelRemoved">; peerAdded: Notification<"peerAdded">; peerConnected: Notification<"peerConnected">; peerCrashed: Notification<"peerCrashed">; peerDeleted: Notification<"peerDeleted">; peerDisconnected: Notification<"peerDisconnected">; peerMetadataUpdated: Notification<"peerMetadataUpdated">; roomCrashed: Notification<"roomCrashed">; roomCreated: Notification<"roomCreated">; roomDeleted: Notification<"roomDeleted">; streamerConnected: Notification<"streamerConnected">; streamerDisconnected: Notification<"streamerDisconnected">; trackAdded: Notification<"trackAdded">; trackForwarding: Notification<"trackForwarding">; trackForwardingRemoved: Notification<"trackForwardingRemoved">; trackMetadataUpdated: Notification<"trackMetadataUpdated">; trackRemoved: Notification<"trackRemoved">; vadNotification: Notification<"vadNotification">; viewerConnected: Notification<"viewerConnected">; viewerDisconnected: Notification<"viewerDisconnected"> }[K]) => void }` + +Defined in: [js-server-sdk/src/notifications.ts:196](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L196) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/OutgoingTrackData.md b/versioned_docs/version-0.29.0/api/server/type-aliases/OutgoingTrackData.md new file mode 100644 index 00000000..ca68ba1a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/OutgoingTrackData.md @@ -0,0 +1,5 @@ +# Type Alias: OutgoingTrackData + +> **OutgoingTrackData** = [`Override`](Override.md)\<`NonNullable`\<`AgentRequest_TrackData`\>, \{ `peerId`: [`PeerId`](PeerId.md); \}\> + +Defined in: [js-server-sdk/src/agent.ts:26](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L26) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/Override.md b/versioned_docs/version-0.29.0/api/server/type-aliases/Override.md new file mode 100644 index 00000000..ea774f50 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/Override.md @@ -0,0 +1,23 @@ +# Type Alias: Override\ + +> **Override**\<`T`, `M`\> = \{ \[K in keyof T\]: K extends keyof M ? undefined extends T\[K\] ? M\[K\] \| undefined : M\[K\] : T\[K\] \} + +Defined in: [js-server-sdk/src/types.ts:27](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L27) + +Replaces the types of fields in `T` whose names appear in `M`, leaving the rest untouched. +Produces a flat object type (single mapped type, no `Omit & {...}` chain) so editor hover +displays the resulting properties directly. + +Keys present in `M` but not in `T` are ignored — only fields that already exist on `T` +are overridden, so a shared override map can be reused across multiple source types. + +`undefined` is re-added to the override when the original field allowed it, so optional +fields on generated proto types (e.g. `peerId?: string | undefined`) remain assignable +from `undefined` under `exactOptionalPropertyTypes`. + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | +| `M` | diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/Peer.md b/versioned_docs/version-0.29.0/api/server/type-aliases/Peer.md new file mode 100644 index 00000000..bcacb3b7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/Peer.md @@ -0,0 +1,5 @@ +# Type Alias: Peer + +> **Peer** = [`Override`](Override.md)\<`OpenApiPeer`, \{ `id`: [`PeerId`](PeerId.md); \}\> + +Defined in: [js-server-sdk/src/types.ts:41](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L41) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerAdded.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerAdded.md new file mode 100644 index 00000000..490c3077 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerAdded.md @@ -0,0 +1,5 @@ +# Type Alias: PeerAdded + +> **PeerAdded** = `object`\[`"peerAdded"`\] + +Defined in: [js-server-sdk/src/notifications.ts:143](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L143) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerConnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerConnected.md new file mode 100644 index 00000000..ff6ff216 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerConnected.md @@ -0,0 +1,5 @@ +# Type Alias: PeerConnected + +> **PeerConnected** = `object`\[`"peerConnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:145](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L145) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerCrashed.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerCrashed.md new file mode 100644 index 00000000..53a62f84 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerCrashed.md @@ -0,0 +1,5 @@ +# Type Alias: PeerCrashed + +> **PeerCrashed** = `object`\[`"peerCrashed"`\] + +Defined in: [js-server-sdk/src/notifications.ts:148](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L148) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDeleted.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDeleted.md new file mode 100644 index 00000000..de4bfc02 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDeleted.md @@ -0,0 +1,5 @@ +# Type Alias: PeerDeleted + +> **PeerDeleted** = `object`\[`"peerDeleted"`\] + +Defined in: [js-server-sdk/src/notifications.ts:144](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L144) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDisconnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDisconnected.md new file mode 100644 index 00000000..c860656a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerDisconnected.md @@ -0,0 +1,5 @@ +# Type Alias: PeerDisconnected + +> **PeerDisconnected** = `object`\[`"peerDisconnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:146](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L146) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerId.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerId.md similarity index 54% rename from versioned_docs/version-0.26.0/api/server/type-aliases/PeerId.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/PeerId.md index 93a37d0c..d44f6a33 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/PeerId.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerId.md @@ -2,6 +2,6 @@ > **PeerId** = [`Brand`](Brand.md)\<`string`, `"PeerId"`\> -Defined in: [js-server-sdk/src/types.ts:18](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L18) +Defined in: [js-server-sdk/src/types.ts:39](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L39) ID of Peer. Peer is associated with Room and can be created with [FishjamClient.createPeer](../classes/FishjamClient.md#createpeer). diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerMetadataUpdated.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerMetadataUpdated.md new file mode 100644 index 00000000..086dbe1c --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerMetadataUpdated.md @@ -0,0 +1,5 @@ +# Type Alias: PeerMetadataUpdated + +> **PeerMetadataUpdated** = `object`\[`"peerMetadataUpdated"`\] + +Defined in: [js-server-sdk/src/notifications.ts:147](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L147) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerOptions.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerOptions.md new file mode 100644 index 00000000..f6a1607a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerOptions.md @@ -0,0 +1,5 @@ +# Type Alias: PeerOptions + +> **PeerOptions** = [`PeerOptionsWebRTC`](../interfaces/PeerOptionsWebRTC.md) \| [`PeerOptionsAgent`](../interfaces/PeerOptionsAgent.md) \| [`PeerOptionsVapi`](../interfaces/PeerOptionsVapi.md) + +Defined in: [js-server-sdk/src/index.ts:8](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/index.ts#L8) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerStatus.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerStatus.md new file mode 100644 index 00000000..2238985a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerStatus.md @@ -0,0 +1,5 @@ +# Type Alias: PeerStatus + +> **PeerStatus** = *typeof* [`PeerStatus`](../variables/PeerStatus.md)\[keyof *typeof* [`PeerStatus`](../variables/PeerStatus.md)\] + +Defined in: fishjam-openapi/dist/index.d.ts:1124 diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/PeerType.md b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerType.md new file mode 100644 index 00000000..01842cf6 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/PeerType.md @@ -0,0 +1,8 @@ +# Type Alias: PeerType + +> **PeerType** = `OpenApiPeerType` \| `"unspecified"` + +Defined in: [js-server-sdk/src/types.ts:47](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L47) + +Peer type as emitted by [FishjamWSNotifier](../classes/FishjamWSNotifier.md). Matches the REST API's `PeerType`, +with the addition of `'unspecified'` for messages whose peer type is not set on the wire. diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/Room.md b/versioned_docs/version-0.29.0/api/server/type-aliases/Room.md new file mode 100644 index 00000000..c84c26fa --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/Room.md @@ -0,0 +1,29 @@ +# Type Alias: Room + +> **Room** = `object` + +Defined in: [js-server-sdk/src/types.ts:60](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L60) + +## Properties + +### config + +> **config**: [`RoomConfig`](../interfaces/RoomConfig.md) + +Defined in: [js-server-sdk/src/types.ts:63](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L63) + +*** + +### id + +> **id**: [`RoomId`](RoomId.md) + +Defined in: [js-server-sdk/src/types.ts:61](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L61) + +*** + +### peers + +> **peers**: [`Peer`](Peer.md)[] + +Defined in: [js-server-sdk/src/types.ts:62](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L62) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCrashed.md b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCrashed.md new file mode 100644 index 00000000..15a7f2e3 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCrashed.md @@ -0,0 +1,5 @@ +# Type Alias: RoomCrashed + +> **RoomCrashed** = `object`\[`"roomCrashed"`\] + +Defined in: [js-server-sdk/src/notifications.ts:142](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L142) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCreated.md b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCreated.md new file mode 100644 index 00000000..4e4c9ce8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomCreated.md @@ -0,0 +1,5 @@ +# Type Alias: RoomCreated + +> **RoomCreated** = `object`\[`"roomCreated"`\] + +Defined in: [js-server-sdk/src/notifications.ts:140](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L140) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/RoomDeleted.md b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomDeleted.md new file mode 100644 index 00000000..049d9de1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomDeleted.md @@ -0,0 +1,5 @@ +# Type Alias: RoomDeleted + +> **RoomDeleted** = `object`\[`"roomDeleted"`\] + +Defined in: [js-server-sdk/src/notifications.ts:141](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L141) diff --git a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomId.md b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomId.md similarity index 51% rename from versioned_docs/version-0.26.0/api/server/type-aliases/RoomId.md rename to versioned_docs/version-0.29.0/api/server/type-aliases/RoomId.md index 863c8856..ba1412da 100644 --- a/versioned_docs/version-0.26.0/api/server/type-aliases/RoomId.md +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomId.md @@ -2,7 +2,7 @@ > **RoomId** = [`Brand`](Brand.md)\<`string`, `"RoomId"`\> -Defined in: [js-server-sdk/src/types.ts:14](https://github.com/fishjam-cloud/js-server-sdk/blob/0007dea898b99b6923059b364584054cf1580b02/packages/js-server-sdk/src/types.ts#L14) +Defined in: [js-server-sdk/src/types.ts:35](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L35) ID of the Room. Room can be created with [FishjamClient.createRoom](../classes/FishjamClient.md#createroom). diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/RoomType.md b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomType.md new file mode 100644 index 00000000..bf66444e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/RoomType.md @@ -0,0 +1,5 @@ +# Type Alias: RoomType + +> **RoomType** = *typeof* [`RoomType`](../variables/RoomType.md)\[keyof *typeof* [`RoomType`](../variables/RoomType.md)\] + +Defined in: fishjam-openapi/dist/index.d.ts:1466 diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ServerNotification.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ServerNotification.md new file mode 100644 index 00000000..f56eec36 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ServerNotification.md @@ -0,0 +1,9 @@ +# Type Alias: ServerNotification + +> **ServerNotification** = `{ [K in ExpectedEvents]: { notification: { channelAdded: Notification<"channelAdded">; channelRemoved: Notification<"channelRemoved">; peerAdded: Notification<"peerAdded">; peerConnected: Notification<"peerConnected">; peerCrashed: Notification<"peerCrashed">; peerDeleted: Notification<"peerDeleted">; peerDisconnected: Notification<"peerDisconnected">; peerMetadataUpdated: Notification<"peerMetadataUpdated">; roomCrashed: Notification<"roomCrashed">; roomCreated: Notification<"roomCreated">; roomDeleted: Notification<"roomDeleted">; streamerConnected: Notification<"streamerConnected">; streamerDisconnected: Notification<"streamerDisconnected">; trackAdded: Notification<"trackAdded">; trackForwarding: Notification<"trackForwarding">; trackForwardingRemoved: Notification<"trackForwardingRemoved">; trackMetadataUpdated: Notification<"trackMetadataUpdated">; trackRemoved: Notification<"trackRemoved">; vadNotification: Notification<"vadNotification">; viewerConnected: Notification<"viewerConnected">; viewerDisconnected: Notification<"viewerDisconnected"> }[K]; type: K } }`\[[`ExpectedEvents`](ExpectedEvents.md)\] + +Defined in: [js-server-sdk/src/notifications.ts:203](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L203) + +A single decoded, mapped server notification tagged with its event type. +The discriminated `type` lets consumers narrow `notification` to the matching +payload (e.g. `if (n.type === 'peerConnected') n.notification.peerType`). diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerConnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerConnected.md new file mode 100644 index 00000000..e7c71a7f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerConnected.md @@ -0,0 +1,5 @@ +# Type Alias: StreamerConnected + +> **StreamerConnected** = `object`\[`"streamerConnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:149](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L149) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerDisconnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerDisconnected.md new file mode 100644 index 00000000..c82dbdb9 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/StreamerDisconnected.md @@ -0,0 +1,5 @@ +# Type Alias: StreamerDisconnected + +> **StreamerDisconnected** = `object`\[`"streamerDisconnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:150](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L150) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/Track.md b/versioned_docs/version-0.29.0/api/server/type-aliases/Track.md new file mode 100644 index 00000000..73f8d1b8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/Track.md @@ -0,0 +1,31 @@ +# Type Alias: Track + +> **Track** = `object` + +Defined in: [js-server-sdk/src/notifications.ts:15](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L15) + +Track payload embedded in [TrackAdded](TrackAdded.md), [TrackRemoved](TrackRemoved.md), [TrackMetadataUpdated](TrackMetadataUpdated.md). + +## Properties + +### id + +> **id**: `string` + +Defined in: [js-server-sdk/src/notifications.ts:16](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L16) + +*** + +### metadata + +> **metadata**: `string` + +Defined in: [js-server-sdk/src/notifications.ts:18](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L18) + +*** + +### type + +> **type**: [`TrackType`](TrackType.md) + +Defined in: [js-server-sdk/src/notifications.ts:17](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L17) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackAdded.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackAdded.md new file mode 100644 index 00000000..85dc5589 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackAdded.md @@ -0,0 +1,5 @@ +# Type Alias: TrackAdded + +> **TrackAdded** = `object`\[`"trackAdded"`\] + +Defined in: [js-server-sdk/src/notifications.ts:153](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L153) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwarding.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwarding.md new file mode 100644 index 00000000..b11f1644 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwarding.md @@ -0,0 +1,5 @@ +# Type Alias: TrackForwarding + +> **TrackForwarding** = `object`\[`"trackForwarding"`\] + +Defined in: [js-server-sdk/src/notifications.ts:156](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L156) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwardingRemoved.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwardingRemoved.md new file mode 100644 index 00000000..a116091a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackForwardingRemoved.md @@ -0,0 +1,5 @@ +# Type Alias: TrackForwardingRemoved + +> **TrackForwardingRemoved** = `object`\[`"trackForwardingRemoved"`\] + +Defined in: [js-server-sdk/src/notifications.ts:157](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L157) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackId.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackId.md new file mode 100644 index 00000000..535ed19f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackId.md @@ -0,0 +1,5 @@ +# Type Alias: TrackId + +> **TrackId** = [`Brand`](Brand.md)\<`string`, `"TrackId"`\> + +Defined in: [js-server-sdk/src/agent.ts:35](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/agent.ts#L35) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackMetadataUpdated.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackMetadataUpdated.md new file mode 100644 index 00000000..7085df60 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackMetadataUpdated.md @@ -0,0 +1,5 @@ +# Type Alias: TrackMetadataUpdated + +> **TrackMetadataUpdated** = `object`\[`"trackMetadataUpdated"`\] + +Defined in: [js-server-sdk/src/notifications.ts:155](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L155) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackRemoved.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackRemoved.md new file mode 100644 index 00000000..530c6a32 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackRemoved.md @@ -0,0 +1,5 @@ +# Type Alias: TrackRemoved + +> **TrackRemoved** = `object`\[`"trackRemoved"`\] + +Defined in: [js-server-sdk/src/notifications.ts:154](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L154) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/TrackType.md b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackType.md new file mode 100644 index 00000000..c093b7ab --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/TrackType.md @@ -0,0 +1,8 @@ +# Type Alias: TrackType + +> **TrackType** = `OpenApiTrackType` \| `"unspecified"` + +Defined in: [js-server-sdk/src/types.ts:53](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L53) + +Track type as emitted by [FishjamWSNotifier](../classes/FishjamWSNotifier.md). Matches the REST API's `TrackType`, +with the addition of `'unspecified'` for messages whose track type is not set on the wire. diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/VadNotification.md b/versioned_docs/version-0.29.0/api/server/type-aliases/VadNotification.md new file mode 100644 index 00000000..03e53f63 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/VadNotification.md @@ -0,0 +1,5 @@ +# Type Alias: VadNotification + +> **VadNotification** = `object`\[`"vadNotification"`\] + +Defined in: [js-server-sdk/src/notifications.ts:158](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L158) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/VadStatus.md b/versioned_docs/version-0.29.0/api/server/type-aliases/VadStatus.md new file mode 100644 index 00000000..a08c0e37 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/VadStatus.md @@ -0,0 +1,7 @@ +# Type Alias: VadStatus + +> **VadStatus** = `"speech"` \| `"silence"` + +Defined in: [js-server-sdk/src/types.ts:58](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/types.ts#L58) + +Voice activity status of a track. diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/VideoCodec.md b/versioned_docs/version-0.29.0/api/server/type-aliases/VideoCodec.md new file mode 100644 index 00000000..a801bd9a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/VideoCodec.md @@ -0,0 +1,5 @@ +# Type Alias: VideoCodec + +> **VideoCodec** = *typeof* [`VideoCodec`](../variables/VideoCodec.md)\[keyof *typeof* [`VideoCodec`](../variables/VideoCodec.md)\] + +Defined in: fishjam-openapi/dist/index.d.ts:1496 diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerConnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerConnected.md new file mode 100644 index 00000000..7d3a8a83 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerConnected.md @@ -0,0 +1,5 @@ +# Type Alias: ViewerConnected + +> **ViewerConnected** = `object`\[`"viewerConnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:151](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L151) diff --git a/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerDisconnected.md b/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerDisconnected.md new file mode 100644 index 00000000..975b9167 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/type-aliases/ViewerDisconnected.md @@ -0,0 +1,5 @@ +# Type Alias: ViewerDisconnected + +> **ViewerDisconnected** = `object`\[`"viewerDisconnected"`\] + +Defined in: [js-server-sdk/src/notifications.ts:152](https://github.com/fishjam-cloud/js-server-sdk/blob/7a2c47c51d7cc50c2a4c18fa0c327279e0b2550c/packages/js-server-sdk/src/notifications.ts#L152) diff --git a/versioned_docs/version-0.29.0/api/server/typedoc-sidebar.cjs b/versioned_docs/version-0.29.0/api/server/typedoc-sidebar.cjs new file mode 100644 index 00000000..b4be08f8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/typedoc-sidebar.cjs @@ -0,0 +1,4 @@ +// @ts-check +/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ +const typedocSidebar = {items:[{type:"category",label:"Client",items:[{type:"doc",id:"api/server/classes/FishjamClient",label:"FishjamClient"},{type:"doc",id:"api/server/classes/FishjamWSNotifier",label:"FishjamWSNotifier"}]},{type:"category",label:"Notifications",items:[{type:"doc",id:"api/server/functions/decodeServerNotifications",label:"decodeServerNotifications"},{type:"doc",id:"api/server/functions/verifyWebhookSignature",label:"verifyWebhookSignature"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/server/classes/BadRequestException",label:"BadRequestException"},{type:"doc",id:"api/server/classes/FishjamAgent",label:"FishjamAgent"},{type:"doc",id:"api/server/classes/FishjamBaseException",label:"FishjamBaseException"},{type:"doc",id:"api/server/classes/FishjamNotFoundException",label:"FishjamNotFoundException"},{type:"doc",id:"api/server/classes/ForbiddenException",label:"ForbiddenException"},{type:"doc",id:"api/server/classes/InvalidFishjamCredentialsException",label:"InvalidFishjamCredentialsException"},{type:"doc",id:"api/server/classes/MissingFishjamIdException",label:"MissingFishjamIdException"},{type:"doc",id:"api/server/classes/PeerNotFoundException",label:"PeerNotFoundException"},{type:"doc",id:"api/server/classes/QuotaExceededException",label:"QuotaExceededException"},{type:"doc",id:"api/server/classes/RoomNotFoundException",label:"RoomNotFoundException"},{type:"doc",id:"api/server/classes/ServiceUnavailableException",label:"ServiceUnavailableException"},{type:"doc",id:"api/server/classes/UnauthorizedException",label:"UnauthorizedException"},{type:"doc",id:"api/server/classes/UnknownException",label:"UnknownException"},{type:"doc",id:"api/server/interfaces/FishjamExceptionInfo",label:"FishjamExceptionInfo"},{type:"doc",id:"api/server/interfaces/MoqAccess",label:"MoqAccess"},{type:"doc",id:"api/server/interfaces/MoqAccessConfig",label:"MoqAccessConfig"},{type:"doc",id:"api/server/interfaces/PeerOptionsAgent",label:"PeerOptionsAgent"},{type:"doc",id:"api/server/interfaces/PeerOptionsVapi",label:"PeerOptionsVapi"},{type:"doc",id:"api/server/interfaces/PeerOptionsWebRTC",label:"PeerOptionsWebRTC"},{type:"doc",id:"api/server/interfaces/RoomConfig",label:"RoomConfig"},{type:"doc",id:"api/server/interfaces/ServerMessage",label:"ServerMessage"},{type:"doc",id:"api/server/interfaces/StreamerToken",label:"StreamerToken"},{type:"doc",id:"api/server/interfaces/ViewerToken",label:"ViewerToken"},{type:"doc",id:"api/server/type-aliases/AgentCallbacks",label:"AgentCallbacks"},{type:"doc",id:"api/server/type-aliases/AgentEvents",label:"AgentEvents"},{type:"doc",id:"api/server/type-aliases/AgentTrack",label:"AgentTrack"},{type:"doc",id:"api/server/type-aliases/AudioCodecParameters",label:"AudioCodecParameters"},{type:"doc",id:"api/server/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/server/type-aliases/ChannelAdded",label:"ChannelAdded"},{type:"doc",id:"api/server/type-aliases/ChannelRemoved",label:"ChannelRemoved"},{type:"doc",id:"api/server/type-aliases/CloseEventHandler",label:"CloseEventHandler"},{type:"doc",id:"api/server/type-aliases/ErrorEventHandler",label:"ErrorEventHandler"},{type:"doc",id:"api/server/type-aliases/ExpectedAgentEvents",label:"ExpectedAgentEvents"},{type:"doc",id:"api/server/type-aliases/ExpectedEvents",label:"ExpectedEvents"},{type:"doc",id:"api/server/type-aliases/FishjamConfig",label:"FishjamConfig"},{type:"doc",id:"api/server/type-aliases/IgnoredEvents",label:"IgnoredEvents"},{type:"doc",id:"api/server/type-aliases/IncomingTrackData",label:"IncomingTrackData"},{type:"doc",id:"api/server/type-aliases/IncomingTrackImage",label:"IncomingTrackImage"},{type:"doc",id:"api/server/type-aliases/NotificationEvents",label:"NotificationEvents"},{type:"doc",id:"api/server/type-aliases/OutgoingTrackData",label:"OutgoingTrackData"},{type:"doc",id:"api/server/type-aliases/Override",label:"Override"},{type:"doc",id:"api/server/type-aliases/Peer",label:"Peer"},{type:"doc",id:"api/server/type-aliases/PeerAdded",label:"PeerAdded"},{type:"doc",id:"api/server/type-aliases/PeerConnected",label:"PeerConnected"},{type:"doc",id:"api/server/type-aliases/PeerCrashed",label:"PeerCrashed"},{type:"doc",id:"api/server/type-aliases/PeerDeleted",label:"PeerDeleted"},{type:"doc",id:"api/server/type-aliases/PeerDisconnected",label:"PeerDisconnected"},{type:"doc",id:"api/server/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/server/type-aliases/PeerMetadataUpdated",label:"PeerMetadataUpdated"},{type:"doc",id:"api/server/type-aliases/PeerOptions",label:"PeerOptions"},{type:"doc",id:"api/server/type-aliases/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/server/type-aliases/PeerType",label:"PeerType"},{type:"doc",id:"api/server/type-aliases/Room",label:"Room"},{type:"doc",id:"api/server/type-aliases/RoomCrashed",label:"RoomCrashed"},{type:"doc",id:"api/server/type-aliases/RoomCreated",label:"RoomCreated"},{type:"doc",id:"api/server/type-aliases/RoomDeleted",label:"RoomDeleted"},{type:"doc",id:"api/server/type-aliases/RoomId",label:"RoomId"},{type:"doc",id:"api/server/type-aliases/RoomType",label:"RoomType"},{type:"doc",id:"api/server/type-aliases/ServerNotification",label:"ServerNotification"},{type:"doc",id:"api/server/type-aliases/StreamerConnected",label:"StreamerConnected"},{type:"doc",id:"api/server/type-aliases/StreamerDisconnected",label:"StreamerDisconnected"},{type:"doc",id:"api/server/type-aliases/Track",label:"Track"},{type:"doc",id:"api/server/type-aliases/TrackAdded",label:"TrackAdded"},{type:"doc",id:"api/server/type-aliases/TrackForwarding",label:"TrackForwarding"},{type:"doc",id:"api/server/type-aliases/TrackForwardingRemoved",label:"TrackForwardingRemoved"},{type:"doc",id:"api/server/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/server/type-aliases/TrackMetadataUpdated",label:"TrackMetadataUpdated"},{type:"doc",id:"api/server/type-aliases/TrackRemoved",label:"TrackRemoved"},{type:"doc",id:"api/server/type-aliases/TrackType",label:"TrackType"},{type:"doc",id:"api/server/type-aliases/VadNotification",label:"VadNotification"},{type:"doc",id:"api/server/type-aliases/VadStatus",label:"VadStatus"},{type:"doc",id:"api/server/type-aliases/VideoCodec",label:"VideoCodec"},{type:"doc",id:"api/server/type-aliases/ViewerConnected",label:"ViewerConnected"},{type:"doc",id:"api/server/type-aliases/ViewerDisconnected",label:"ViewerDisconnected"},{type:"doc",id:"api/server/variables/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/server/variables/RoomType",label:"RoomType"},{type:"doc",id:"api/server/variables/ServerMessage",label:"ServerMessage"},{type:"doc",id:"api/server/variables/VideoCodec",label:"VideoCodec"}]}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.29.0/api/server/variables/PeerStatus.md b/versioned_docs/version-0.29.0/api/server/variables/PeerStatus.md new file mode 100644 index 00000000..67f59860 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/variables/PeerStatus.md @@ -0,0 +1,19 @@ +# Variable: PeerStatus + +> `const` **PeerStatus**: `object` + +Defined in: fishjam-openapi/dist/index.d.ts:1124 + +Informs about the peer status + +## Type declaration + +### Connected + +> `readonly` **Connected**: `"connected"` + +### Disconnected + +> `readonly` **Disconnected**: `"disconnected"` + +## Export diff --git a/versioned_docs/version-0.29.0/api/server/variables/RoomType.md b/versioned_docs/version-0.29.0/api/server/variables/RoomType.md new file mode 100644 index 00000000..56d097a2 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/variables/RoomType.md @@ -0,0 +1,35 @@ +# Variable: RoomType + +> `const` **RoomType**: `object` + +Defined in: fishjam-openapi/dist/index.d.ts:1466 + +The use-case of the room. If not provided, this defaults to conference. + +## Type declaration + +### AudioOnly + +> `readonly` **AudioOnly**: `"audio_only"` + +### AudioOnlyLivestream + +> `readonly` **AudioOnlyLivestream**: `"audio_only_livestream"` + +### Broadcaster + +> `readonly` **Broadcaster**: `"broadcaster"` + +### Conference + +> `readonly` **Conference**: `"conference"` + +### FullFeature + +> `readonly` **FullFeature**: `"full_feature"` + +### Livestream + +> `readonly` **Livestream**: `"livestream"` + +## Export diff --git a/versioned_docs/version-0.26.0/api/server/variables/ServerMessage.md b/versioned_docs/version-0.29.0/api/server/variables/ServerMessage.md similarity index 100% rename from versioned_docs/version-0.26.0/api/server/variables/ServerMessage.md rename to versioned_docs/version-0.29.0/api/server/variables/ServerMessage.md diff --git a/versioned_docs/version-0.29.0/api/server/variables/VideoCodec.md b/versioned_docs/version-0.29.0/api/server/variables/VideoCodec.md new file mode 100644 index 00000000..4cbbd1a9 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/server/variables/VideoCodec.md @@ -0,0 +1,19 @@ +# Variable: VideoCodec + +> `const` **VideoCodec**: `object` + +Defined in: fishjam-openapi/dist/index.d.ts:1496 + +Enforces video codec for each peer in the room + +## Type declaration + +### H264 + +> `readonly` **H264**: `"h264"` + +### Vp8 + +> `readonly` **Vp8**: `"vp8"` + +## Export diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index.md new file mode 100644 index 00000000..f2d212fb --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index.md @@ -0,0 +1,6 @@ +# @fishjam-cloud/react-native-vision-camera-source + +## Modules + +- [index](index/index.md) +- [webgpu](webgpu/index.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/rotationDegreesFromOrientation.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/rotationDegreesFromOrientation.md new file mode 100644 index 00000000..f8d45784 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/rotationDegreesFromOrientation.md @@ -0,0 +1,23 @@ +# Function: rotationDegreesFromOrientation() + +> **rotationDegreesFromOrientation**(`orientation`): `0` \| `90` \| `180` \| `270` + +Defined in: [react-native-vision-camera-source/src/orientation.ts:15](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/orientation.ts#L15) + +Maps a VisionCamera frame orientation to the clockwise rotation, in degrees, needed to bring the +frame's pixel data upright: `'up'` → 0, `'right'` → 90, `'down'` → 180, `'left'` → 270. + +The source hooks apply this automatically. It is exported for advanced consumers who wire the +low-level frame APIs from `@fishjam-cloud/react-native-webrtc` themselves. + +Worklet-safe: call it from a frame callback or from the JS thread. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `orientation` | `CameraOrientation` | A VisionCamera `Frame.orientation` value. | + +## Returns + +`0` \| `90` \| `180` \| `270` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/useVisionCameraSource.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/useVisionCameraSource.md new file mode 100644 index 00000000..41d5f17b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index/functions/useVisionCameraSource.md @@ -0,0 +1,41 @@ +# Function: useVisionCameraSource() + +> **useVisionCameraSource**\<`SourceId`\>(`sourceId`, `options`): [`UseVisionCameraSourceResult`](../interfaces/UseVisionCameraSourceResult.md) + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:89](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L89) + +Publishes your VisionCamera feed to Fishjam. + +A sibling of `useCustomSource`: the hook creates the video track, publishes it under +`sourceId`, and cleans everything up on unmount. Each camera frame is handed to Fishjam +without copying its pixels. Must be used under `FishjamProvider`. + +```tsx +const { frameOutput, stream } = useVisionCameraSource('my-camera'); + +useVisionCamera({ device: cameraDevice, isActive: true, outputs: [frameOutput] }); + +return stream ? : null; +``` + +To also run inference on the same frames, pass an [onFrame](../interfaces/UseVisionCameraSourceOptions.md#onframe) +worklet. To render your own content into the published video with WebGPU, use +`useVisionCameraWebGpuSource` from `@fishjam-cloud/react-native-vision-camera-source/webgpu` +instead. + +## Type Parameters + +| Type Parameter | +| ------ | +| `SourceId` *extends* `string` | + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sourceId` | `SourceId` | Identifies this source among the peer's tracks, like in `useCustomSource`. | +| `options` | [`UseVisionCameraSourceOptions`](../interfaces/UseVisionCameraSourceOptions.md) | See [UseVisionCameraSourceOptions](../interfaces/UseVisionCameraSourceOptions.md). | + +## Returns + +[`UseVisionCameraSourceResult`](../interfaces/UseVisionCameraSourceResult.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index/index.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index/index.md new file mode 100644 index 00000000..bffa9c18 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index/index.md @@ -0,0 +1,27 @@ +# index + +VisionCamera → Fishjam adapter. + +Source hooks that publish a VisionCamera feed to Fishjam, in the same family as +`useCustomSource`: the hook owns the track, the publishing, and the cleanup, and hands you a +VisionCamera frame output to plug into your own camera session. + +- [useVisionCameraSource](functions/useVisionCameraSource.md) — publish the camera feed as-is (copy-free), optionally running + inference worklets on the same frames. +- `useVisionCameraWebGpuSource` (from `@fishjam-cloud/react-native-vision-camera-source/webgpu`) + — render your own WebGPU content into the published video. + +Requires VisionCamera 5 and `FishjamProvider` from `@fishjam-cloud/react-native-client`. + +## Interfaces + +- [UseVisionCameraSourceOptions](interfaces/UseVisionCameraSourceOptions.md) +- [UseVisionCameraSourceResult](interfaces/UseVisionCameraSourceResult.md) + +## Hooks + +- [useVisionCameraSource](functions/useVisionCameraSource.md) + +## Utilities + +- [rotationDegreesFromOrientation](functions/rotationDegreesFromOrientation.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceOptions.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceOptions.md new file mode 100644 index 00000000..a2c1dbc3 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceOptions.md @@ -0,0 +1,78 @@ +# Interface: UseVisionCameraSourceOptions + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L24) + +Options for [useVisionCameraSource](../functions/useVisionCameraSource.md). Also accepts every VisionCamera frame-output option +(`targetResolution`, `pixelFormat`, `dropFramesWhileBusy`, and so on) and passes it through. + +## Extends + +- `Partial`\<`FrameOutputOptions`\> + +## Properties + +### enabled? + +> `optional` **enabled**: `boolean` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:29](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L29) + +Whether the source is live. While `false`, no track exists and nothing is published — the +declarative sibling of VisionCamera's `isActive`. Defaults to `true`. + +*** + +### frameIntervalNanoseconds? + +> `optional` **frameIntervalNanoseconds**: `number` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:46](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L46) + +Fallback spacing between published frames, in nanoseconds, used only when a camera frame +carries no usable timestamp. Defaults to 33,333,333 (30 fps). + +*** + +### onFrame()? + +> `optional` **onFrame**: (`frame`) => `void` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:39](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L39) + +Optional worklet called with every camera frame, after the frame has been sent to Fishjam — +run your frame-processor plugins (pose detection, OCR, …) here. + +The frame is valid only for the duration of this synchronous callback; the hook releases it +when the callback returns, so do not retain it. Keep the function's identity stable +(`useCallback` or module scope) — a new function every render forces VisionCamera to +re-register the frame callback. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `frame` | `Frame` | + +#### Returns + +`void` + +*** + +### onFrameDropped()? + +> `optional` **onFrameDropped**: (`reason`) => `void` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L41) + +Called whenever the camera pipeline drops a frame; forwarded to VisionCamera. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `reason` | `FrameDroppedReason` | + +#### Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceResult.md b/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceResult.md new file mode 100644 index 00000000..f9c4cdae --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/index/interfaces/UseVisionCameraSourceResult.md @@ -0,0 +1,37 @@ +# Interface: UseVisionCameraSourceResult + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:50](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L50) + +Result of [useVisionCameraSource](../functions/useVisionCameraSource.md). + +## Properties + +### error + +> **error**: `null` \| `Error` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:62](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L62) + +Failure while creating the underlying track, if any. + +*** + +### frameOutput + +> **frameOutput**: `CameraFrameOutput` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:55](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L55) + +The VisionCamera frame output driving this source. Plug it into your camera session: +`useCamera({ device, isActive, outputs: [frameOutput] })`. + +*** + +### stream + +> **stream**: `null` \| `MediaStream` + +Defined in: [react-native-vision-camera-source/src/useVisionCameraSource.ts:60](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/useVisionCameraSource.ts#L60) + +The published stream — render it with `RTCView` for a self-view. `null` until the +underlying track is ready (creation is asynchronous). diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/typedoc-sidebar.cjs b/versioned_docs/version-0.29.0/api/vision-camera-source/typedoc-sidebar.cjs new file mode 100644 index 00000000..b0aede8f --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/typedoc-sidebar.cjs @@ -0,0 +1,4 @@ +// @ts-check +/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ +const typedocSidebar = {items:[{type:"category",label:"index",items:[{type:"category",label:"Interfaces",items:[{type:"doc",id:"api/vision-camera-source/index/interfaces/UseVisionCameraSourceOptions",label:"UseVisionCameraSourceOptions"},{type:"doc",id:"api/vision-camera-source/index/interfaces/UseVisionCameraSourceResult",label:"UseVisionCameraSourceResult"}]},{type:"category",label:"Hooks",items:[{type:"doc",id:"api/vision-camera-source/index/functions/useVisionCameraSource",label:"useVisionCameraSource"}]},{type:"category",label:"Utilities",items:[{type:"doc",id:"api/vision-camera-source/index/functions/rotationDegreesFromOrientation",label:"rotationDegreesFromOrientation"}]}],link:{type:"doc",id:"api/vision-camera-source/index/index"}},{type:"category",label:"webgpu",items:[{type:"category",label:"Interfaces",items:[{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipelineOptions",label:"CameraPassthroughPipelineOptions"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/CreateCameraShaderBindingsOptions",label:"CreateCameraShaderBindingsOptions"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/UseCameraWebGpuDeviceResult",label:"UseCameraWebGpuDeviceResult"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceOptions",label:"UseVisionCameraWebGpuSourceOptions"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceResult",label:"UseVisionCameraWebGpuSourceResult"}]},{type:"category",label:"Type Aliases",items:[{type:"doc",id:"api/vision-camera-source/webgpu/type-aliases/WebGpuRuntime",label:"WebGpuRuntime"}]},{type:"category",label:"Functions",items:[{type:"doc",id:"api/vision-camera-source/webgpu/functions/getWebGpuRuntime",label:"getWebGpuRuntime"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/useCameraWebGpuDeviceWithOverride",label:"useCameraWebGpuDeviceWithOverride"}]},{type:"category",label:"Hooks",items:[{type:"doc",id:"api/vision-camera-source/webgpu/functions/useVisionCameraWebGpuSource",label:"useVisionCameraWebGpuSource"}]},{type:"category",label:"WebGPU",items:[{type:"doc",id:"api/vision-camera-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport",label:"assertWebGpuDeviceSupportsCameraImport"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/computeAspectFillCrop",label:"computeAspectFillCrop"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/computeSquareCrop",label:"computeSquareCrop"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/createCameraBindGroup",label:"createCameraBindGroup"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/createCameraPassthroughPipeline",label:"createCameraPassthroughPipeline"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/createCameraShaderBindings",label:"createCameraShaderBindings"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/createCameraTextureResolver",label:"createCameraTextureResolver"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/encodeCameraPassthrough",label:"encodeCameraPassthrough"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/getOutputSurfaceFormat",label:"getOutputSurfaceFormat"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/getRequiredWebGpuCameraFeatures",label:"getRequiredWebGpuCameraFeatures"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/packFrameCropParams",label:"packFrameCropParams"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/resolveCameraTexture",label:"resolveCameraTexture"},{type:"doc",id:"api/vision-camera-source/webgpu/functions/useCameraWebGpuDevice",label:"useCameraWebGpuDevice"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipeline",label:"CameraPassthroughPipeline"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/CameraShaderBindings",label:"CameraShaderBindings"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/CameraTextureResolver",label:"CameraTextureResolver"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/FrameCrop",label:"FrameCrop"},{type:"doc",id:"api/vision-camera-source/webgpu/interfaces/WebGpuFrameRenderContext",label:"WebGpuFrameRenderContext"},{type:"doc",id:"api/vision-camera-source/webgpu/type-aliases/WebGpuFrameRenderFunction",label:"WebGpuFrameRenderFunction"},{type:"doc",id:"api/vision-camera-source/webgpu/variables/FrameCropParams",label:"FrameCropParams"},{type:"doc",id:"api/vision-camera-source/webgpu/variables/sampleCamera",label:"sampleCamera"}]}],link:{type:"doc",id:"api/vision-camera-source/webgpu/index"}}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md new file mode 100644 index 00000000..26b87e7c --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/assertWebGpuDeviceSupportsCameraImport.md @@ -0,0 +1,19 @@ +# Function: assertWebGpuDeviceSupportsCameraImport() + +> **assertWebGpuDeviceSupportsCameraImport**(`device`): `void` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/requiredFeatures.d.ts:16 + +Throws a descriptive error when `device` is missing any feature required to import camera +frames or Fishjam output surfaces on this platform. Called automatically on devices passed as +an override; call it yourself to validate a device early. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeAspectFillCrop.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeAspectFillCrop.md new file mode 100644 index 00000000..637a7abc --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeAspectFillCrop.md @@ -0,0 +1,30 @@ +# Function: computeAspectFillCrop() + +> **computeAspectFillCrop**(`sourceWidth`, `sourceHeight`, `targetAspect`, `uv00?`, `uv01?`, `uv10?`, `uv11?`): [`FrameCrop`](../interfaces/FrameCrop.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:59 + +Center-crop of a (sourceWidth × sourceHeight) frame to the target aspect ratio (width/height). +A no-op full-frame crop when the source already has the target aspect. Worklet-safe. + +Feed it the upright camera size from the render context: +`computeAspectFillCrop(context.cameraWidth, context.cameraHeight, context.outputWidth / context.outputHeight)`. + +The optional `uv00..uv11` scalars form a UV-space transform applied around the frame center +(identity by default). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `sourceWidth` | `number` | +| `sourceHeight` | `number` | +| `targetAspect` | `number` | +| `uv00?` | `number` | +| `uv01?` | `number` | +| `uv10?` | `number` | +| `uv11?` | `number` | + +## Returns + +[`FrameCrop`](../interfaces/FrameCrop.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeSquareCrop.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeSquareCrop.md new file mode 100644 index 00000000..d7f8f594 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/computeSquareCrop.md @@ -0,0 +1,23 @@ +# Function: computeSquareCrop() + +> **computeSquareCrop**(`sourceWidth`, `sourceHeight`, `uv00?`, `uv01?`, `uv10?`, `uv11?`): [`FrameCrop`](../interfaces/FrameCrop.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:66 + +Square center-crop of a (sourceWidth × sourceHeight) frame — the usual shape for square model +inputs. Worklet-safe. The optional `uv00..uv11` scalars are as in [computeAspectFillCrop](computeAspectFillCrop.md). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `sourceWidth` | `number` | +| `sourceHeight` | `number` | +| `uv00?` | `number` | +| `uv01?` | `number` | +| `uv10?` | `number` | +| `uv11?` | `number` | + +## Returns + +[`FrameCrop`](../interfaces/FrameCrop.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraBindGroup.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraBindGroup.md new file mode 100644 index 00000000..0426dae8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraBindGroup.md @@ -0,0 +1,24 @@ +# Function: createCameraBindGroup() + +> **createCameraBindGroup**(`device`, `cameraShaderBindings`, `cameraTexture`): `GPUBindGroup` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:68 + +Builds the per-frame bind group for the live camera texture. The source hook already does this +for you when you pass `cameraShaderBindings` in its options (see the render context's +`cameraBindGroup`); call it yourself only for advanced multi-layout setups. Worklet-safe. + +A camera texture expires when the frame ends, so a bind group referencing it must be rebuilt +every frame — never cache the result. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `cameraShaderBindings` | [`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) | +| `cameraTexture` | `GPUExternalTexture` | + +## Returns + +`GPUBindGroup` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraPassthroughPipeline.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraPassthroughPipeline.md new file mode 100644 index 00000000..cb4beb48 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraPassthroughPipeline.md @@ -0,0 +1,20 @@ +# Function: createCameraPassthroughPipeline() + +> **createCameraPassthroughPipeline**(`device`, `options?`): [`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:32 + +Builds the full-screen camera passthrough pipeline: crop/orientation via [FrameCrop](../interfaces/FrameCrop.md), +platform-correct camera sampling, one triangle. Use it to publish the camera through the WebGPU +tier with zero WGSL of your own, or as the base pass under your overlay passes. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `options?` | [`CameraPassthroughPipelineOptions`](../interfaces/CameraPassthroughPipelineOptions.md) | + +## Returns + +[`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraShaderBindings.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraShaderBindings.md new file mode 100644 index 00000000..823d92a0 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraShaderBindings.md @@ -0,0 +1,29 @@ +# Function: createCameraShaderBindings() + +> **createCameraShaderBindings**(`device`, `options?`): [`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:57 + +Builds the camera-sampling bindings against the device your pipelines use. Pass the result to +the source hook's `cameraShaderBindings` option and the render context delivers a ready-made +`cameraBindGroup` every frame — set it at [CameraShaderBindings.bindGroupIndex](../interfaces/CameraShaderBindings.md#bindgroupindex) and call +`sampleCamera(uv)` in your fragment shader. + +```ts +const cam = createCameraShaderBindings(device); +const fragment = tgpu.fragmentFn({ in: { uv: d.location(0, d.vec2f) }, out: d.vec4f })((input) => { + return cam.sampleCamera(input.uv); +}); +const wgsl = cam.bindingDeclarations + tgpu.resolve({ externals: { fragment } }); +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `options?` | [`CreateCameraShaderBindingsOptions`](../interfaces/CreateCameraShaderBindingsOptions.md) | + +## Returns + +[`CameraShaderBindings`](../interfaces/CameraShaderBindings.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraTextureResolver.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraTextureResolver.md new file mode 100644 index 00000000..c7e4fc04 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/createCameraTextureResolver.md @@ -0,0 +1,20 @@ +# Function: createCameraTextureResolver() + +> **createCameraTextureResolver**(`device`, `size`): [`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:27 + +Creates a [CameraTextureResolver](../interfaces/CameraTextureResolver.md) with an owned `rgba8unorm` texture of the given size. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `size` | \{ `height`: `number`; `width`: `number`; \} | +| `size.height` | `number` | +| `size.width` | `number` | + +## Returns + +[`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/encodeCameraPassthrough.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/encodeCameraPassthrough.md new file mode 100644 index 00000000..12f12a7e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/encodeCameraPassthrough.md @@ -0,0 +1,29 @@ +# Function: encodeCameraPassthrough() + +> **encodeCameraPassthrough**(`device`, `passthrough`, `cameraTexture`, `outputView`, `commandEncoder`, `crop`): `void` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:45 + +Encodes one full-screen pass drawing the camera into `outputView`, cropped per `crop`. +Worklet-safe; call it inside your render callback, and encode any overlay passes after it on +the same command encoder (with `loadOp: 'load'` so they draw on top). + +At most one call per pipeline instance per frame: the crop lives in a single uniform buffer +written via `queue.writeBuffer`, which lands before the submitted command buffer executes — a +second call in the same frame makes both draws use the second crop. Encode to multiple targets +with different crops by building one pipeline per target. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `passthrough` | [`CameraPassthroughPipeline`](../interfaces/CameraPassthroughPipeline.md) | +| `cameraTexture` | `GPUExternalTexture` | +| `outputView` | `GPUTextureView` | +| `commandEncoder` | `GPUCommandEncoder` | +| `crop` | [`FrameCrop`](../interfaces/FrameCrop.md) | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getOutputSurfaceFormat.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getOutputSurfaceFormat.md new file mode 100644 index 00000000..95c2ddd2 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getOutputSurfaceFormat.md @@ -0,0 +1,13 @@ +# Function: getOutputSurfaceFormat() + +> **getOutputSurfaceFormat**(): `GPUTextureFormat` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/requiredFeatures.d.ts:24 + +The pixel format of Fishjam output surfaces on this platform: `'rgba8unorm'` on Android +(AHardwareBuffer), `'bgra8unorm'` on iOS (IOSurface). Use it as the render-target format of any +pipeline that draws into the output texture — a mismatched format renders wrong or black. + +## Returns + +`GPUTextureFormat` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md new file mode 100644 index 00000000..bd167a06 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getRequiredWebGpuCameraFeatures.md @@ -0,0 +1,13 @@ +# Function: getRequiredWebGpuCameraFeatures() + +> **getRequiredWebGpuCameraFeatures**(): `GPUFeatureName`[] + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/requiredFeatures.d.ts:8 + +The GPU features a device must have to import camera frames and Fishjam output surfaces on this +platform. [useCameraWebGpuDevice](useCameraWebGpuDevice.md) requests them for you; pass them yourself as +`requiredFeatures` in `GPUDeviceDescriptor` when you bring your own device. + +## Returns + +`GPUFeatureName`[] diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getWebGpuRuntime.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getWebGpuRuntime.md new file mode 100644 index 00000000..4d5bd175 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/getWebGpuRuntime.md @@ -0,0 +1,20 @@ +# Function: getWebGpuRuntime() + +> **getWebGpuRuntime**(): `object` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/webGpuRuntime.d.ts:13 + +Returns the react-native-webgpu runtime singleton, self-healing when the `RNWebGPU` global is +missing on the calling runtime. The library binds the global once at module load, but that +binding can be absent after a crash-recovery runtime reload or an install-ordering flake; +`WebGPUModule.install()` binds it to the calling runtime and is safe to repeat. + +## Returns + +`object` + +## Throws + +When the runtime cannot be installed (react-native-webgpu missing or its native module +not linked) — returning the still-undefined global would only defer the failure to an opaque +per-frame TypeError. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/packFrameCropParams.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/packFrameCropParams.md new file mode 100644 index 00000000..ce9cdedd --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/packFrameCropParams.md @@ -0,0 +1,18 @@ +# Function: packFrameCropParams() + +> **packFrameCropParams**(`crop`): `ArrayBuffer` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:46 + +Packs a [FrameCrop](../interfaces/FrameCrop.md) into the [FrameCropParams](../variables/FrameCropParams.md) uniform byte layout. +Worklet-safe; upload the result with `device.queue.writeBuffer(buffer, 0, bytes)`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `crop` | [`FrameCrop`](../interfaces/FrameCrop.md) | + +## Returns + +`ArrayBuffer` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/resolveCameraTexture.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/resolveCameraTexture.md new file mode 100644 index 00000000..77ddfcf7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/resolveCameraTexture.md @@ -0,0 +1,24 @@ +# Function: resolveCameraTexture() + +> **resolveCameraTexture**(`device`, `resolver`, `cameraTexture`, `cameraWidth`, `cameraHeight`, `commandEncoder`): `void` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:38 + +Encodes one pass resolving the live camera texture into `resolver.texture`, aspect-filled to +the resolver's size (platform YUV decode included). Worklet-safe; call it inside your render +callback before the passes that sample `resolver.texture`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `device` | `GPUDevice` | +| `resolver` | [`CameraTextureResolver`](../interfaces/CameraTextureResolver.md) | +| `cameraTexture` | `GPUExternalTexture` | +| `cameraWidth` | `number` | +| `cameraHeight` | `number` | +| `commandEncoder` | `GPUCommandEncoder` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDevice.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDevice.md new file mode 100644 index 00000000..26928d68 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDevice.md @@ -0,0 +1,19 @@ +# Function: useCameraWebGpuDevice() + +> **useCameraWebGpuDevice**(): [`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/useCameraWebGpuDevice.d.ts:21 + +The app-wide GPUDevice used for camera work, configured with +[getRequiredWebGpuCameraFeatures](getRequiredWebGpuCameraFeatures.md). All callers share one device, so pipelines you build +against it work with the textures the source hook hands your render callback. + +Build your pipelines once the device arrives: +```tsx +const { device } = useCameraWebGpuDevice(); +const effect = useMemo(() => (device ? buildMyEffect(device) : null), [device]); +``` + +## Returns + +[`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md new file mode 100644 index 00000000..887bc4b4 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useCameraWebGpuDeviceWithOverride.md @@ -0,0 +1,18 @@ +# Function: useCameraWebGpuDeviceWithOverride() + +> **useCameraWebGpuDeviceWithOverride**(`override`): [`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/useCameraWebGpuDevice.d.ts:26 + +Device resolution for the source hook: the user-provided override (validated) when present, +otherwise the shared device. Always called, so hook order stays stable either way. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `override` | `undefined` \| `GPUDevice` | + +## Returns + +[`UseCameraWebGpuDeviceResult`](../interfaces/UseCameraWebGpuDeviceResult.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useVisionCameraWebGpuSource.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useVisionCameraWebGpuSource.md new file mode 100644 index 00000000..471f4487 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/functions/useVisionCameraWebGpuSource.md @@ -0,0 +1,45 @@ +# Function: useVisionCameraWebGpuSource() + +> **useVisionCameraWebGpuSource**\<`SourceId`\>(`sourceId`, `options`): [`UseVisionCameraWebGpuSourceResult`](../interfaces/UseVisionCameraWebGpuSourceResult.md) + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:126](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L126) + +Publishes WebGPU-rendered video to Fishjam, fed by your VisionCamera feed. + +A sibling of `useCustomSource`: the hook creates the video track (and its pool of output +surfaces), publishes it under `sourceId`, and cleans everything up on unmount. Every camera +frame reaches your `onFrame` worklet, where calling `render(...)` hands you the live camera as +a GPU texture plus an output texture to draw into — what you draw is what peers receive. +Everything else is handled for you: output-surface management, GPU synchronization with the +video encoder, timestamps, rotation, and frame lifetimes. Must be used under `FishjamProvider`. + +```tsx +const { frameOutput, stream, device } = useVisionCameraWebGpuSource('my-camera', { + width: 720, + height: 1280, + cameraShaderBindings: effect?.cameraBindings, + onFrame, +}); +useVisionCamera({ device: cameraDevice, isActive: true, outputs: [frameOutput] }); +``` + +To publish the camera unmodified (no rendering), use `useVisionCameraSource` from the package +root instead. For a ready-made camera→output pass to build on, see +`createCameraPassthroughPipeline`. + +## Type Parameters + +| Type Parameter | +| ------ | +| `SourceId` *extends* `string` | + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sourceId` | `SourceId` | Identifies this source among the peer's tracks, like in `useCustomSource`. | +| `options` | [`UseVisionCameraWebGpuSourceOptions`](../interfaces/UseVisionCameraWebGpuSourceOptions.md) | See [UseVisionCameraWebGpuSourceOptions](../interfaces/UseVisionCameraWebGpuSourceOptions.md). | + +## Returns + +[`UseVisionCameraWebGpuSourceResult`](../interfaces/UseVisionCameraWebGpuSourceResult.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/index.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/index.md new file mode 100644 index 00000000..629db7a7 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/index.md @@ -0,0 +1,57 @@ +# webgpu + +WebGPU tier of the VisionCamera → Fishjam adapter — render your own content into the published +video. Requires `react-native-webgpu` (an optional peer of this package; only this entry point +loads it). + +- [useVisionCameraWebGpuSource](functions/useVisionCameraWebGpuSource.md) — the source hook: camera in, your WebGPU passes, + published video out. +- Re-exports the WebGPU camera toolkit from + `@fishjam-cloud/react-native-custom-video-source/webgpu` — `createCameraShaderBindings` / + `sampleCamera`, `createCameraPassthroughPipeline`, the cropping helpers, the shared + camera-import device, and so on — so you can build your shaders alongside the hook. + +## Interfaces + +- [CameraPassthroughPipelineOptions](interfaces/CameraPassthroughPipelineOptions.md) +- [CreateCameraShaderBindingsOptions](interfaces/CreateCameraShaderBindingsOptions.md) +- [UseCameraWebGpuDeviceResult](interfaces/UseCameraWebGpuDeviceResult.md) +- [UseVisionCameraWebGpuSourceOptions](interfaces/UseVisionCameraWebGpuSourceOptions.md) +- [UseVisionCameraWebGpuSourceResult](interfaces/UseVisionCameraWebGpuSourceResult.md) + +## Type Aliases + +- [WebGpuRuntime](type-aliases/WebGpuRuntime.md) + +## Functions + +- [getWebGpuRuntime](functions/getWebGpuRuntime.md) +- [useCameraWebGpuDeviceWithOverride](functions/useCameraWebGpuDeviceWithOverride.md) + +## Hooks + +- [useVisionCameraWebGpuSource](functions/useVisionCameraWebGpuSource.md) + +## WebGPU + +- [assertWebGpuDeviceSupportsCameraImport](functions/assertWebGpuDeviceSupportsCameraImport.md) +- [computeAspectFillCrop](functions/computeAspectFillCrop.md) +- [computeSquareCrop](functions/computeSquareCrop.md) +- [createCameraBindGroup](functions/createCameraBindGroup.md) +- [createCameraPassthroughPipeline](functions/createCameraPassthroughPipeline.md) +- [createCameraShaderBindings](functions/createCameraShaderBindings.md) +- [createCameraTextureResolver](functions/createCameraTextureResolver.md) +- [encodeCameraPassthrough](functions/encodeCameraPassthrough.md) +- [getOutputSurfaceFormat](functions/getOutputSurfaceFormat.md) +- [getRequiredWebGpuCameraFeatures](functions/getRequiredWebGpuCameraFeatures.md) +- [packFrameCropParams](functions/packFrameCropParams.md) +- [resolveCameraTexture](functions/resolveCameraTexture.md) +- [useCameraWebGpuDevice](functions/useCameraWebGpuDevice.md) +- [CameraPassthroughPipeline](interfaces/CameraPassthroughPipeline.md) +- [CameraShaderBindings](interfaces/CameraShaderBindings.md) +- [CameraTextureResolver](interfaces/CameraTextureResolver.md) +- [FrameCrop](interfaces/FrameCrop.md) +- [WebGpuFrameRenderContext](interfaces/WebGpuFrameRenderContext.md) +- [WebGpuFrameRenderFunction](type-aliases/WebGpuFrameRenderFunction.md) +- [FrameCropParams](variables/FrameCropParams.md) +- [sampleCamera](variables/sampleCamera.md) diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipeline.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipeline.md new file mode 100644 index 00000000..2b3bfc03 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipeline.md @@ -0,0 +1,44 @@ +# Interface: CameraPassthroughPipeline + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:16 + +A ready-made full-screen camera→target render pipeline. Build once at setup with +[createCameraPassthroughPipeline](../functions/createCameraPassthroughPipeline.md); every field is safe to capture into the frame worklet. + +## Properties + +### cameraShaderBindings + +> `readonly` **cameraShaderBindings**: [`CameraShaderBindings`](CameraShaderBindings.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:19 + +The camera shader bindings the pipeline samples through. + +*** + +### cropBindGroup + +> `readonly` **cropBindGroup**: `GPUBindGroup` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:23 + +Static bind group with the crop uniform. + +*** + +### cropParamsBuffer + +> `readonly` **cropParamsBuffer**: `GPUBuffer` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:21 + +Uniform buffer holding the packed FrameCropParams; written by [encodeCameraPassthrough](../functions/encodeCameraPassthrough.md). + +*** + +### pipeline + +> `readonly` **pipeline**: `GPURenderPipeline` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:17 diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md new file mode 100644 index 00000000..b45cbde9 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraPassthroughPipelineOptions.md @@ -0,0 +1,25 @@ +# Interface: CameraPassthroughPipelineOptions + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:4 + +Options for [createCameraPassthroughPipeline](../functions/createCameraPassthroughPipeline.md). + +## Properties + +### mirror? + +> `optional` **mirror**: `boolean` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:8 + +Mirror the camera horizontally (the usual selfie self-view convention). Defaults to `false`. + +*** + +### outputFormat? + +> `optional` **outputFormat**: `GPUTextureFormat` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraPassthroughPipeline.d.ts:6 + +Render-target format. Defaults to [getOutputSurfaceFormat](../functions/getOutputSurfaceFormat.md) (the Fishjam output surface). diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraShaderBindings.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraShaderBindings.md new file mode 100644 index 00000000..e5ddd6a8 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraShaderBindings.md @@ -0,0 +1,58 @@ +# Interface: CameraShaderBindings + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:23 + +Everything a fragment shader needs to sample the live camera. Build once at setup with +[createCameraShaderBindings](../functions/createCameraShaderBindings.md); the fields are safe to capture into the frame worklet. + +## Properties + +### bindGroupIndex + +> `readonly` **bindGroupIndex**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:39 + +The group index the bindings are declared at. + +*** + +### bindGroupLayout + +> `readonly` **bindGroupLayout**: `GPUBindGroupLayout` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:35 + +Layout of the camera bind group; place it at [bindGroupIndex](#bindgroupindex) in your pipeline layout. + +*** + +### bindingDeclarations + +> `readonly` **bindingDeclarations**: `string` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:33 + +WGSL declaring the camera `texture_external` and `sampler` at [bindGroupIndex](#bindgroupindex). TypeGPU +cannot emit an external-texture binding, so prepend this to the WGSL your shader resolves to. + +*** + +### sampleCamera + +> `readonly` **sampleCamera**: `TgpuFn`\<(`uv`) => `Vec4f`\> + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:28 + +The camera sampler as a TypeGPU function — call `sampleCamera(uv)` from your TGSL fragment +shader. Same value as the exported [sampleCamera](../variables/sampleCamera.md). + +*** + +### sampler + +> `readonly` **sampler**: `GPUSampler` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:37 + +The linear-filtering sampler bound at binding 1. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraTextureResolver.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraTextureResolver.md new file mode 100644 index 00000000..8b640d00 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CameraTextureResolver.md @@ -0,0 +1,58 @@ +# Interface: CameraTextureResolver + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:12 + +An owned `rgba8unorm` texture the camera frame is resolved into each frame — for pipelines that +want a plain `texture_2d` camera instead of `texture_external`. Build once at setup with +[createCameraTextureResolver](../functions/createCameraTextureResolver.md); every field is safe to capture into the frame worklet. + +Prefer sampling the camera directly via [createCameraShaderBindings](../functions/createCameraShaderBindings.md) when you can: the +resolver costs one extra render pass per frame. + +## Properties + +### height + +> `readonly` **height**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:18 + +*** + +### resolvePass + +> `readonly` **resolvePass**: [`CameraPassthroughPipeline`](CameraPassthroughPipeline.md) + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:20 + +**`Internal`** + +The pass used to resolve into [texture](#texture). + +*** + +### texture + +> `readonly` **texture**: `GPUTexture` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:14 + +The resolved camera texture (`rgba8unorm`, sampled + render-attachment usage). + +*** + +### view + +> `readonly` **view**: `GPUTextureView` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:16 + +A reusable default view of [texture](#texture). + +*** + +### width + +> `readonly` **width**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraTextureResolver.d.ts:17 diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md new file mode 100644 index 00000000..99800412 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/CreateCameraShaderBindingsOptions.md @@ -0,0 +1,15 @@ +# Interface: CreateCameraShaderBindingsOptions + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:13 + +Options for [createCameraShaderBindings](../functions/createCameraShaderBindings.md). + +## Properties + +### bindGroupIndex? + +> `optional` **bindGroupIndex**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:15 + +Bind group index the camera texture + sampler are declared at. Defaults to `0`. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/FrameCrop.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/FrameCrop.md new file mode 100644 index 00000000..a5db0012 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/FrameCrop.md @@ -0,0 +1,88 @@ +# Interface: FrameCrop + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:27 + +A center-crop of a source frame plus a UV-space orientation transform, in source pixels. +Produce one with [computeAspectFillCrop](../functions/computeAspectFillCrop.md) or [computeSquareCrop](../functions/computeSquareCrop.md). + +## Properties + +### cropOriginX + +> **cropOriginX**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:30 + +*** + +### cropOriginY + +> **cropOriginY**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:31 + +*** + +### cropSizeX + +> **cropSizeX**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:32 + +*** + +### cropSizeY + +> **cropSizeY**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:33 + +*** + +### sourceHeight + +> **sourceHeight**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:29 + +*** + +### sourceWidth + +> **sourceWidth**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:28 + +*** + +### uv00 + +> **uv00**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:35 + +uvTransform matrix scalars in (m00, m01, m10, m11) order; identity when omitted at compute time. + +*** + +### uv01 + +> **uv01**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:36 + +*** + +### uv10 + +> **uv10**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:37 + +*** + +### uv11 + +> **uv11**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:38 diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md new file mode 100644 index 00000000..c7aead6b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseCameraWebGpuDeviceResult.md @@ -0,0 +1,25 @@ +# Interface: UseCameraWebGpuDeviceResult + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/useCameraWebGpuDevice.d.ts:2 + +Result of [useCameraWebGpuDevice](../functions/useCameraWebGpuDevice.md). + +## Properties + +### device + +> **device**: `null` \| `GPUDevice` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/useCameraWebGpuDevice.d.ts:4 + +The shared GPUDevice; `null` until acquisition resolves. + +*** + +### error + +> **error**: `null` \| `Error` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/useCameraWebGpuDevice.d.ts:6 + +Acquisition failure (no adapter, missing platform features), if any. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceOptions.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceOptions.md new file mode 100644 index 00000000..0bdccdef --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceOptions.md @@ -0,0 +1,132 @@ +# Interface: UseVisionCameraWebGpuSourceOptions + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:37](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L37) + +Options for [useVisionCameraWebGpuSource](../functions/useVisionCameraWebGpuSource.md). Also accepts every VisionCamera frame-output +option except `pixelFormat`, which the hook forces to `'native'` (the zero-copy camera-import +path requires it). + +## Extends + +- `Partial`\<`Omit`\<`FrameOutputOptions`, `"pixelFormat"`\>\> + +## Properties + +### cameraShaderBindings? + +> `optional` **cameraShaderBindings**: [`CameraShaderBindings`](CameraShaderBindings.md) + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:62](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L62) + +Camera shader bindings built with `createCameraShaderBindings`. When set, the render context +carries a ready-made `cameraBindGroup` for the live camera texture every frame. + +*** + +### device? + +> `optional` **device**: `GPUDevice` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:57](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L57) + +Bring your own GPUDevice instead of the shared one from `useCameraWebGpuDevice`. It is +validated against the required camera-import features; a device missing any of them surfaces +a descriptive `error` instead of failing per frame. + +*** + +### enabled? + +> `optional` **enabled**: `boolean` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:42](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L42) + +Whether the source is live. While `false`, no track or surface pool exists and nothing is +published — the declarative sibling of VisionCamera's `isActive`. Defaults to `true`. + +*** + +### frameIntervalNanoseconds? + +> `optional` **frameIntervalNanoseconds**: `number` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:77](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L77) + +Fallback spacing between published frames, in nanoseconds, used only when a camera frame +carries no usable timestamp. Defaults to 33,333,333 (30 fps). + +*** + +### height + +> **height**: `number` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:46](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L46) + +Height of the published video, in pixels. + +*** + +### onFrame() + +> **onFrame**: (`frame`, `render`) => `void` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:70](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L70) + +Worklet called for every camera frame. Call `render(...)` at most once to draw this frame's +output; skipping it drops the frame (nothing is published for it). After `render(...)` +returns you may keep using `frame` (for example run inference) — but only until this +callback returns, when the hook releases the frame. Do not retain it. Keep the function's +identity stable (`useCallback` or module scope). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `frame` | `Frame` | +| `render` | [`WebGpuFrameRenderFunction`](../type-aliases/WebGpuFrameRenderFunction.md) | + +#### Returns + +`void` + +*** + +### onFrameDropped()? + +> `optional` **onFrameDropped**: (`reason`) => `void` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:72](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L72) + +Called whenever the camera pipeline drops a frame; forwarded to VisionCamera. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `reason` | `FrameDroppedReason` | + +#### Returns + +`void` + +*** + +### poolSize? + +> `optional` **poolSize**: `number` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:51](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L51) + +Number of in-flight output surfaces (a pushed frame may still be encoding while the next one +is drawn). Defaults to `3`. + +*** + +### width + +> **width**: `number` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:44](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L44) + +Width of the published video, in pixels. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceResult.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceResult.md new file mode 100644 index 00000000..68f70d3d --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/UseVisionCameraWebGpuSourceResult.md @@ -0,0 +1,47 @@ +# Interface: UseVisionCameraWebGpuSourceResult + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:81](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L81) + +Result of [useVisionCameraWebGpuSource](../functions/useVisionCameraWebGpuSource.md). + +## Properties + +### device + +> **device**: `null` \| `GPUDevice` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:93](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L93) + +The GPUDevice in use — build your pipelines against it. `null` until acquired. + +*** + +### error + +> **error**: `null` \| `Error` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:95](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L95) + +WebGPU runtime, device acquisition, track creation, or publishing failure, if any. + +*** + +### frameOutput + +> **frameOutput**: `CameraFrameOutput` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:86](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L86) + +The VisionCamera frame output driving this source. Plug it into your camera session: +`useCamera({ device, isActive, outputs: [frameOutput] })`. + +*** + +### stream + +> **stream**: `null` \| `MediaStream` + +Defined in: [react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts:91](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-native-vision-camera-source/src/webgpu/useVisionCameraWebGpuSource.ts#L91) + +The published stream — render it with `RTCView` for a self-view. `null` until the underlying +track is ready (creation is asynchronous). diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/WebGpuFrameRenderContext.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/WebGpuFrameRenderContext.md new file mode 100644 index 00000000..e438e914 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/interfaces/WebGpuFrameRenderContext.md @@ -0,0 +1,135 @@ +# Interface: WebGpuFrameRenderContext + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:8 + +Everything your render callback needs for one frame. Handed to the function you pass to +`render(...)` inside the source hook's `onFrame` worklet; every field is valid only until that +function returns. + +## Properties + +### cameraBindGroup? + +> `optional` **cameraBindGroup**: `GPUBindGroup` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:31 + +Ready-made bind group for [cameraTexture](#cameratexture), present when the hook's +`cameraShaderBindings` option was provided: set it at the bindings' group index and +`sampleCamera(uv)` works. + +*** + +### cameraHeight + +> **cameraHeight**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:50 + +*** + +### cameraIsMirrored + +> **cameraIsMirrored**: `boolean` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:52 + +Whether the camera feed is mirrored (front cameras usually are). + +*** + +### cameraTexture + +> **cameraTexture**: `GPUExternalTexture` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:25 + +The live camera frame as a `texture_external`, already rotated upright (and mirrored per the +camera's mirroring). On Android it samples as raw YCbCr — sample it through +`createCameraShaderBindings` (or the ready-made [cameraBindGroup](#camerabindgroup)) for +platform-correct RGB. + +*** + +### cameraWidth + +> **cameraWidth**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:49 + +Upright (post-rotation) camera frame size, in pixels — feed it to `computeAspectFillCrop` +together with the output aspect. + +*** + +### commandEncoder + +> **commandEncoder**: `GPUCommandEncoder` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:18 + +The command encoder for this frame. Encode your render/compute passes into it — the hook +submits it (a single submit) and delivers the frame after your callback returns. Do not call +`queue.submit` yourself for work targeting [outputTexture](#outputtexture). + +*** + +### device + +> **device**: `GPUDevice` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:10 + +The device in use (the shared device, or your override). + +*** + +### outputHeight + +> **outputHeight**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:44 + +*** + +### outputTexture + +> **outputTexture**: `GPUTexture` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:33 + +The output texture your passes draw into; its content becomes the published video frame. + +*** + +### outputView + +> **outputView**: `GPUTextureView` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:41 + +A cached, reusable default `createView()` of [outputTexture](#outputtexture). Prefer this over calling +`outputTexture.createView()` yourself every frame: `GPUTextureView` has no `destroy()`/`release()` +in react-native-webgpu, so a per-frame view accumulates native (malloc) wrappers on the frame +runtime until GC — a steady leak in a render loop. The output textures are a small fixed pool, so +the hook builds one view per slot and reuses it. + +*** + +### outputWidth + +> **outputWidth**: `number` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:43 + +Size of [outputTexture](#outputtexture), in pixels. + +*** + +### queue + +> **queue**: `GPUQueue` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:12 + +Shortcut for `device.queue`. diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md new file mode 100644 index 00000000..cb3b6058 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuFrameRenderFunction.md @@ -0,0 +1,18 @@ +# Type Alias: WebGpuFrameRenderFunction() + +> **WebGpuFrameRenderFunction** = (`encode`) => `void` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/frameRenderContext.d.ts:60 + +The `render` function handed to the source hook's `onFrame` worklet. Call it at most once per +frame with your encode function; skipping it drops the frame (nothing is published for it). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encode` | (`context`) => `void` | + +## Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuRuntime.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuRuntime.md new file mode 100644 index 00000000..3b1ade5b --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/type-aliases/WebGpuRuntime.md @@ -0,0 +1,7 @@ +# Type Alias: WebGpuRuntime + +> **WebGpuRuntime** = *typeof* `RNWebGPU` + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/webGpuRuntime.d.ts:2 + +The react-native-webgpu runtime singleton (the `RNWebGPU` JSI global). diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/FrameCropParams.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/FrameCropParams.md new file mode 100644 index 00000000..369a9a5c --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/FrameCropParams.md @@ -0,0 +1,11 @@ +# Variable: FrameCropParams + +> `const` **FrameCropParams**: `d.WgslStruct`\<\{ `cropOrigin`: `d.Vec2f`; `cropSize`: `d.Vec2f`; `sourceSize`: `d.Vec2u`; `uvTransform`: `d.Mat2x2f`; \}\> + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cropUtilities.d.ts:15 + +The TypeGPU schema for the crop uniform. This is the single source of truth for both the WGSL +`struct FrameCropParams` (emitted when the passthrough shader is resolved) and the byte layout +[packFrameCropParams](../functions/packFrameCropParams.md) writes. Its std140 layout is 40 bytes: + + sourceSize: vec2u @0 cropOrigin: vec2f @8 cropSize: vec2f @16 uvTransform: mat2x2f @24 diff --git a/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/sampleCamera.md b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/sampleCamera.md new file mode 100644 index 00000000..2ddcfe67 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/vision-camera-source/webgpu/variables/sampleCamera.md @@ -0,0 +1,10 @@ +# Variable: sampleCamera + +> `const` **sampleCamera**: `TgpuFn`\<(`uv`) => `d.Vec4f`\> + +Defined in: react-native-custom-video-source/dist/typescript/webgpu/cameraShaderBindings.d.ts:11 + +Samples the live camera and returns upright RGB on both platforms (the Android in-shader BT.709 +YUV decode is included automatically). A TypeGPU function you can call from your own TGSL +fragment shaders. It reads the camera texture + sampler declared by +[CameraShaderBindings.bindingDeclarations](../interfaces/CameraShaderBindings.md#bindingdeclarations), which you must prepend to the resolved shader. diff --git a/versioned_docs/version-0.26.0/api/mobile/enumerations/Variant.md b/versioned_docs/version-0.29.0/api/web/enumerations/Variant.md similarity index 50% rename from versioned_docs/version-0.26.0/api/mobile/enumerations/Variant.md rename to versioned_docs/version-0.29.0/api/web/enumerations/Variant.md index 9907848e..fc4e6cfa 100644 --- a/versioned_docs/version-0.26.0/api/mobile/enumerations/Variant.md +++ b/versioned_docs/version-0.29.0/api/web/enumerations/Variant.md @@ -1,6 +1,6 @@ # Enumeration: Variant -Defined in: packages/ts-client/dist/index.d.mts:51 +Defined in: ts-client/dist/index.d.mts:51 ## Enumeration Members @@ -8,7 +8,7 @@ Defined in: packages/ts-client/dist/index.d.mts:51 > **UNRECOGNIZED**: `-1` -Defined in: packages/ts-client/dist/index.d.mts:56 +Defined in: ts-client/dist/index.d.mts:56 *** @@ -16,7 +16,7 @@ Defined in: packages/ts-client/dist/index.d.mts:56 > **VARIANT\_HIGH**: `3` -Defined in: packages/ts-client/dist/index.d.mts:55 +Defined in: ts-client/dist/index.d.mts:55 *** @@ -24,7 +24,7 @@ Defined in: packages/ts-client/dist/index.d.mts:55 > **VARIANT\_LOW**: `1` -Defined in: packages/ts-client/dist/index.d.mts:53 +Defined in: ts-client/dist/index.d.mts:53 *** @@ -32,7 +32,7 @@ Defined in: packages/ts-client/dist/index.d.mts:53 > **VARIANT\_MEDIUM**: `2` -Defined in: packages/ts-client/dist/index.d.mts:54 +Defined in: ts-client/dist/index.d.mts:54 *** @@ -40,4 +40,4 @@ Defined in: packages/ts-client/dist/index.d.mts:54 > **VARIANT\_UNSPECIFIED**: `0` -Defined in: packages/ts-client/dist/index.d.mts:52 +Defined in: ts-client/dist/index.d.mts:52 diff --git a/versioned_docs/version-0.26.0/api/web/functions/FishjamProvider.md b/versioned_docs/version-0.29.0/api/web/functions/FishjamProvider.md similarity index 72% rename from versioned_docs/version-0.26.0/api/web/functions/FishjamProvider.md rename to versioned_docs/version-0.29.0/api/web/functions/FishjamProvider.md index def25ad0..66e77773 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/FishjamProvider.md +++ b/versioned_docs/version-0.29.0/api/web/functions/FishjamProvider.md @@ -2,7 +2,7 @@ > **FishjamProvider**(`props`): `Element` -Defined in: [react-client/src/FishjamProvider.tsx:74](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L74) +Defined in: [react-client/src/FishjamProvider.tsx:74](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L74) Provides the Fishjam Context diff --git a/versioned_docs/version-0.26.0/api/web/functions/useCamera.md b/versioned_docs/version-0.29.0/api/web/functions/useCamera.md similarity index 95% rename from versioned_docs/version-0.26.0/api/web/functions/useCamera.md rename to versioned_docs/version-0.29.0/api/web/functions/useCamera.md index 764058a6..55accf3a 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useCamera.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useCamera.md @@ -2,7 +2,7 @@ > **useCamera**(): `object` -Defined in: [react-client/src/hooks/devices/useCamera.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useCamera.ts#L9) +Defined in: [react-client/src/hooks/devices/useCamera.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useCamera.ts#L9) This hook can toggle camera on/off, change camera, provides current camera and other. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useConnection.md b/versioned_docs/version-0.29.0/api/web/functions/useConnection.md similarity index 89% rename from versioned_docs/version-0.26.0/api/web/functions/useConnection.md rename to versioned_docs/version-0.29.0/api/web/functions/useConnection.md index 6a503939..00530a42 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useConnection.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useConnection.md @@ -2,7 +2,7 @@ > **useConnection**(): `object` -Defined in: [react-client/src/hooks/useConnection.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useConnection.ts#L26) +Defined in: [react-client/src/hooks/useConnection.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useConnection.ts#L26) Hook allows to join or leave a room and check the current connection status. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useCustomSource.md b/versioned_docs/version-0.29.0/api/web/functions/useCustomSource.md similarity index 67% rename from versioned_docs/version-0.26.0/api/web/functions/useCustomSource.md rename to versioned_docs/version-0.29.0/api/web/functions/useCustomSource.md index 6cb68f71..91923810 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useCustomSource.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useCustomSource.md @@ -2,7 +2,7 @@ > **useCustomSource**\<`T`\>(`sourceId`): `object` -Defined in: [react-client/src/hooks/useCustomSource.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useCustomSource.ts#L9) +Defined in: [react-client/src/hooks/useCustomSource.ts:11](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useCustomSource.ts#L11) This hook can register/deregister a custom MediaStream with Fishjam. @@ -14,9 +14,9 @@ This hook can register/deregister a custom MediaStream with Fishjam. ## Parameters -| Parameter | Type | -| ------ | ------ | -| `sourceId` | `T` | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sourceId` | `T` | Stable id identifying this custom source. | ## Returns diff --git a/versioned_docs/version-0.26.0/api/web/functions/useDataChannel.md b/versioned_docs/version-0.29.0/api/web/functions/useDataChannel.md similarity index 56% rename from versioned_docs/version-0.26.0/api/web/functions/useDataChannel.md rename to versioned_docs/version-0.29.0/api/web/functions/useDataChannel.md index 7c40bad5..efe51c70 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useDataChannel.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useDataChannel.md @@ -2,7 +2,7 @@ > **useDataChannel**(): [`UseDataChannelResult`](../type-aliases/UseDataChannelResult.md) -Defined in: [react-client/src/hooks/useDataChannel.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useDataChannel.ts#L14) +Defined in: [react-client/src/hooks/useDataChannel.ts:15](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useDataChannel.ts#L15) Hook for data channel operations - publish and subscribe to data. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useInitializeDevices.md b/versioned_docs/version-0.29.0/api/web/functions/useInitializeDevices.md similarity index 85% rename from versioned_docs/version-0.26.0/api/web/functions/useInitializeDevices.md rename to versioned_docs/version-0.29.0/api/web/functions/useInitializeDevices.md index ec97e43c..6ee75d9c 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useInitializeDevices.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useInitializeDevices.md @@ -2,7 +2,7 @@ > **useInitializeDevices**(): `object` -Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L14) +Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L14) Hook allows you to initialize access to the devices before joining the room. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useLivestreamStreamer.md b/versioned_docs/version-0.29.0/api/web/functions/useLivestreamStreamer.md similarity index 77% rename from versioned_docs/version-0.26.0/api/web/functions/useLivestreamStreamer.md rename to versioned_docs/version-0.29.0/api/web/functions/useLivestreamStreamer.md index 3cf0a72c..8a014a95 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useLivestreamStreamer.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useLivestreamStreamer.md @@ -2,7 +2,7 @@ > **useLivestreamStreamer**(): [`UseLivestreamStreamerResult`](../interfaces/UseLivestreamStreamerResult.md) -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L52) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:52](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L52) Hook for publishing a livestream, which can be then received with [useLivestreamViewer](useLivestreamViewer.md) diff --git a/versioned_docs/version-0.26.0/api/web/functions/useLivestreamViewer.md b/versioned_docs/version-0.29.0/api/web/functions/useLivestreamViewer.md similarity index 73% rename from versioned_docs/version-0.26.0/api/web/functions/useLivestreamViewer.md rename to versioned_docs/version-0.29.0/api/web/functions/useLivestreamViewer.md index 75d88ccc..2b2ff232 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useLivestreamViewer.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useLivestreamViewer.md @@ -2,7 +2,7 @@ > **useLivestreamViewer**(): [`UseLivestreamViewerResult`](../interfaces/UseLivestreamViewerResult.md) -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:43](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L43) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:43](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L43) Hook for receiving a published livestream. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useMicrophone.md b/versioned_docs/version-0.29.0/api/web/functions/useMicrophone.md similarity index 96% rename from versioned_docs/version-0.26.0/api/web/functions/useMicrophone.md rename to versioned_docs/version-0.29.0/api/web/functions/useMicrophone.md index 0704c74b..8995444e 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useMicrophone.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useMicrophone.md @@ -2,7 +2,7 @@ > **useMicrophone**(): `object` -Defined in: [react-client/src/hooks/devices/useMicrophone.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useMicrophone.ts#L9) +Defined in: [react-client/src/hooks/devices/useMicrophone.ts:9](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useMicrophone.ts#L9) Manage microphone diff --git a/versioned_docs/version-0.26.0/api/web/functions/usePeers.md b/versioned_docs/version-0.29.0/api/web/functions/usePeers.md similarity index 67% rename from versioned_docs/version-0.26.0/api/web/functions/usePeers.md rename to versioned_docs/version-0.29.0/api/web/functions/usePeers.md index 07263b0c..4f09c596 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/usePeers.md +++ b/versioned_docs/version-0.29.0/api/web/functions/usePeers.md @@ -2,7 +2,7 @@ > **usePeers**\<`PeerMetadata`, `ServerMetadata`\>(): `object` -Defined in: [react-client/src/hooks/usePeers.ts:103](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/usePeers.ts#L103) +Defined in: [react-client/src/hooks/usePeers.ts:115](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L115) Hook allows to access id, tracks and metadata of the local and remote peers. @@ -37,3 +37,20 @@ This property will be removed in future versions. > **remotePeers**: [`PeerWithTracks`](../type-aliases/PeerWithTracks.md)\<`PeerMetadata`, `ServerMetadata`, [`RemoteTrack`](../type-aliases/RemoteTrack.md)\>[] Array of remote peers with distinguished tracks (camera, microphone, screen share). + +### setReceivedTracksQuality() + +> **setReceivedTracksQuality**: (`trackIds`, `quality`) => `void` + +This function allows to set the quality of tracks received from remote peers. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `trackIds` | `string`[] | The array of the track ids to set the quality for. | +| `quality` | [`Variant`](../enumerations/Variant.md) | The quality to set for the track. | + +#### Returns + +`void` diff --git a/versioned_docs/version-0.26.0/api/web/functions/useSandbox.md b/versioned_docs/version-0.29.0/api/web/functions/useSandbox.md similarity index 55% rename from versioned_docs/version-0.26.0/api/web/functions/useSandbox.md rename to versioned_docs/version-0.29.0/api/web/functions/useSandbox.md index cb3b315a..9ecd9b91 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useSandbox.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useSandbox.md @@ -1,14 +1,14 @@ # Function: useSandbox() -> **useSandbox**(`props?`): `object` +> **useSandbox**(`props`): `object` -Defined in: [react-client/src/hooks/useSandbox.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useSandbox.ts#L21) +Defined in: [react-client/src/hooks/useSandbox.ts:29](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L29) ## Parameters | Parameter | Type | | ------ | ------ | -| `props?` | [`UseSandboxProps`](../type-aliases/UseSandboxProps.md) | +| `props` | [`UseSandboxProps`](../type-aliases/UseSandboxProps.md) | ## Returns @@ -29,6 +29,34 @@ Defined in: [react-client/src/hooks/useSandbox.ts:21](https://github.com/fishjam `Promise`\<\{ `room`: \{ `id`: `string`; `name`: `string`; \}; `streamerToken`: `string`; \}\> +### getSandboxMoqPublisherAccess() + +> **getSandboxMoqPublisherAccess**: (`streamName`) => `Promise`\<[`MoqAccess`](../type-aliases/MoqAccess.md)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `streamName` | `string` | + +#### Returns + +`Promise`\<[`MoqAccess`](../type-aliases/MoqAccess.md)\> + +### getSandboxMoqSubscriberAccess() + +> **getSandboxMoqSubscriberAccess**: (`streamName`) => `Promise`\<[`MoqAccess`](../type-aliases/MoqAccess.md)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `streamName` | `string` | + +#### Returns + +`Promise`\<[`MoqAccess`](../type-aliases/MoqAccess.md)\> + ### getSandboxPeerToken() > **getSandboxPeerToken**: (`roomName`, `peerName`, `roomType`) => `Promise`\<`string`\> diff --git a/versioned_docs/version-0.26.0/api/web/functions/useScreenShare.md b/versioned_docs/version-0.29.0/api/web/functions/useScreenShare.md similarity index 94% rename from versioned_docs/version-0.26.0/api/web/functions/useScreenShare.md rename to versioned_docs/version-0.29.0/api/web/functions/useScreenShare.md index 6326de86..be54f432 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useScreenShare.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useScreenShare.md @@ -2,7 +2,7 @@ > **useScreenShare**(): `object` -Defined in: [react-client/src/hooks/useScreenShare.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useScreenShare.ts#L10) +Defined in: [react-client/src/hooks/useScreenShare.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useScreenShare.ts#L10) Hook to enable screen sharing within a room and manage the existing stream. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useUpdatePeerMetadata.md b/versioned_docs/version-0.29.0/api/web/functions/useUpdatePeerMetadata.md similarity index 83% rename from versioned_docs/version-0.26.0/api/web/functions/useUpdatePeerMetadata.md rename to versioned_docs/version-0.29.0/api/web/functions/useUpdatePeerMetadata.md index 6c00e342..6e51c8a2 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useUpdatePeerMetadata.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useUpdatePeerMetadata.md @@ -2,7 +2,7 @@ > **useUpdatePeerMetadata**\<`PeerMetadata`\>(): `object` -Defined in: [react-client/src/hooks/useUpdatePeerMetadata.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useUpdatePeerMetadata.ts#L12) +Defined in: [react-client/src/hooks/useUpdatePeerMetadata.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useUpdatePeerMetadata.ts#L12) Hook provides a method to update the metadata of the local peer. diff --git a/versioned_docs/version-0.26.0/api/web/functions/useVAD.md b/versioned_docs/version-0.29.0/api/web/functions/useVAD.md similarity index 87% rename from versioned_docs/version-0.26.0/api/web/functions/useVAD.md rename to versioned_docs/version-0.29.0/api/web/functions/useVAD.md index ad957db7..eb337342 100644 --- a/versioned_docs/version-0.26.0/api/web/functions/useVAD.md +++ b/versioned_docs/version-0.29.0/api/web/functions/useVAD.md @@ -2,7 +2,7 @@ > **useVAD**(`options`): `Record`\<[`PeerId`](../type-aliases/PeerId.md), `boolean`\> -Defined in: [react-client/src/hooks/useVAD.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useVAD.ts#L35) +Defined in: [react-client/src/hooks/useVAD.ts:34](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useVAD.ts#L34) Voice activity detection. Use this hook to check if voice is detected in the audio track for given peer(s). diff --git a/versioned_docs/version-0.26.0/api/web/index.md b/versioned_docs/version-0.29.0/api/web/index.md similarity index 98% rename from versioned_docs/version-0.26.0/api/web/index.md rename to versioned_docs/version-0.29.0/api/web/index.md index dabe879b..8134ba27 100644 --- a/versioned_docs/version-0.26.0/api/web/index.md +++ b/versioned_docs/version-0.29.0/api/web/index.md @@ -53,6 +53,7 @@ React client SDK for building web video and audio apps with Fishjam. - [InitializeDevicesStatus](type-aliases/InitializeDevicesStatus.md) - [JoinErrorReason](type-aliases/JoinErrorReason.md) - [MiddlewareResult](type-aliases/MiddlewareResult.md) +- [MoqAccess](type-aliases/MoqAccess.md) - [PeerId](type-aliases/PeerId.md) - [PeerStatus](type-aliases/PeerStatus.md) - [PeerWithTracks](type-aliases/PeerWithTracks.md) diff --git a/versioned_docs/version-0.26.0/api/mobile/interfaces/DataChannelOptions.md b/versioned_docs/version-0.29.0/api/web/interfaces/DataChannelOptions.md similarity index 72% rename from versioned_docs/version-0.26.0/api/mobile/interfaces/DataChannelOptions.md rename to versioned_docs/version-0.29.0/api/web/interfaces/DataChannelOptions.md index 9694abab..3ac150b4 100644 --- a/versioned_docs/version-0.26.0/api/mobile/interfaces/DataChannelOptions.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/DataChannelOptions.md @@ -1,6 +1,6 @@ # Interface: DataChannelOptions -Defined in: packages/ts-client/dist/index.d.mts:501 +Defined in: ts-client/dist/index.d.mts:501 Options for publishing or subscribing to data. @@ -10,7 +10,7 @@ Options for publishing or subscribing to data. > **reliable**: `boolean` -Defined in: packages/ts-client/dist/index.d.mts:506 +Defined in: ts-client/dist/index.d.mts:506 If true, uses the reliable data channel (ordered, guaranteed delivery). If false, uses the lossy data channel (unordered, low latency). diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/FishjamProviderProps.md b/versioned_docs/version-0.29.0/api/web/interfaces/FishjamProviderProps.md similarity index 67% rename from versioned_docs/version-0.26.0/api/web/interfaces/FishjamProviderProps.md rename to versioned_docs/version-0.29.0/api/web/interfaces/FishjamProviderProps.md index f09e0292..d9663c9f 100644 --- a/versioned_docs/version-0.26.0/api/web/interfaces/FishjamProviderProps.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/FishjamProviderProps.md @@ -1,6 +1,6 @@ # Interface: FishjamProviderProps -Defined in: [react-client/src/FishjamProvider.tsx:27](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L27) +Defined in: [react-client/src/FishjamProvider.tsx:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L27) ## Extends @@ -12,7 +12,7 @@ Defined in: [react-client/src/FishjamProvider.tsx:27](https://github.com/fishjam > `optional` **audioConfig**: [`StreamConfig`](../type-aliases/StreamConfig.md) -Defined in: [react-client/src/FishjamProvider.tsx:55](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L55) +Defined in: [react-client/src/FishjamProvider.tsx:55](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L55) Configure whether to use audio simulcast and which quality layers to send if so. @@ -22,7 +22,7 @@ Configure whether to use audio simulcast and which quality layers to send if so. > `optional` **bandwidthLimits**: `Partial`\<[`BandwidthLimits`](../type-aliases/BandwidthLimits.md)\> -Defined in: [react-client/src/FishjamProvider.tsx:47](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L47) +Defined in: [react-client/src/FishjamProvider.tsx:47](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L47) Adjust max bandwidth limit for a single stream and simulcast. @@ -32,7 +32,7 @@ Adjust max bandwidth limit for a single stream and simulcast. > `optional` **constraints**: `Pick`\<`MediaStreamConstraints`, `"audio"` \| `"video"`\> -Defined in: [react-client/src/FishjamProvider.tsx:38](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L38) +Defined in: [react-client/src/FishjamProvider.tsx:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L38) Set preferred constraints. @@ -50,7 +50,7 @@ The media stream constraints as defined by the Web API. > `optional` **debug**: `boolean` -Defined in: [react-client/src/FishjamProvider.tsx:63](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L63) +Defined in: [react-client/src/FishjamProvider.tsx:63](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L63) Enables Fishjam SDK's debug logs in the console. @@ -60,7 +60,7 @@ Enables Fishjam SDK's debug logs in the console. > `optional` **fishjamClient**: `FishjamClient`\<`GenericMetadata`, `GenericMetadata`\> -Defined in: [react-client/src/FishjamProvider.tsx:67](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L67) +Defined in: [react-client/src/FishjamProvider.tsx:67](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L67) Allows to provide your own FishjamClient instance from ts-client. @@ -70,7 +70,7 @@ Allows to provide your own FishjamClient instance from ts-client. > **fishjamId**: `string` -Defined in: [react-client/src/FishjamProvider.tsx:59](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L59) +Defined in: [react-client/src/FishjamProvider.tsx:59](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L59) You can get you Fishjam ID at https://fishjam.io/app @@ -80,7 +80,7 @@ You can get you Fishjam ID at https://fishjam.io/app > `optional` **persistLastDevice**: `boolean` \| [`PersistLastDeviceHandlers`](../type-aliases/PersistLastDeviceHandlers.md) -Defined in: [react-client/src/FishjamProvider.tsx:43](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L43) +Defined in: [react-client/src/FishjamProvider.tsx:43](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L43) Decide if you want Fishjam SDK to persist last used device in the local storage. You can also provide your getter and setter by using the [PersistLastDeviceHandlers](../type-aliases/PersistLastDeviceHandlers.md) interface. @@ -91,7 +91,7 @@ You can also provide your getter and setter by using the [PersistLastDeviceHandl > `optional` **reconnect**: `boolean` \| [`ReconnectConfig`](../type-aliases/ReconnectConfig.md) -Defined in: [react-client/src/FishjamProvider.tsx:32](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L32) +Defined in: [react-client/src/FishjamProvider.tsx:32](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L32) Use [ReconnectConfig](../type-aliases/ReconnectConfig.md) to adjust reconnection policy to your needs or set false it. Set to true by default. @@ -102,6 +102,6 @@ Set to true by default. > `optional` **videoConfig**: [`StreamConfig`](../type-aliases/StreamConfig.md) -Defined in: [react-client/src/FishjamProvider.tsx:51](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/FishjamProvider.tsx#L51) +Defined in: [react-client/src/FishjamProvider.tsx:51](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/FishjamProvider.tsx#L51) Configure whether to use video simulcast and which quality layers to send if so. diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/JoinRoomConfig.md b/versioned_docs/version-0.29.0/api/web/interfaces/JoinRoomConfig.md similarity index 63% rename from versioned_docs/version-0.26.0/api/web/interfaces/JoinRoomConfig.md rename to versioned_docs/version-0.29.0/api/web/interfaces/JoinRoomConfig.md index 33a2e919..08d35cfc 100644 --- a/versioned_docs/version-0.26.0/api/web/interfaces/JoinRoomConfig.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/JoinRoomConfig.md @@ -1,6 +1,6 @@ # Interface: JoinRoomConfig\ -Defined in: [react-client/src/hooks/useConnection.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useConnection.ts#L10) +Defined in: [react-client/src/hooks/useConnection.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useConnection.ts#L10) ## Type Parameters @@ -14,7 +14,7 @@ Defined in: [react-client/src/hooks/useConnection.ts:10](https://github.com/fish > `optional` **peerMetadata**: `PeerMetadata` -Defined in: [react-client/src/hooks/useConnection.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useConnection.ts#L18) +Defined in: [react-client/src/hooks/useConnection.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useConnection.ts#L18) String indexed record with metadata, that will be available to all other peers @@ -24,6 +24,6 @@ String indexed record with metadata, that will be available to all other peers > **peerToken**: `string` -Defined in: [react-client/src/hooks/useConnection.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useConnection.ts#L14) +Defined in: [react-client/src/hooks/useConnection.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useConnection.ts#L14) Token received from server (or Room Manager) diff --git a/versioned_docs/version-0.26.0/api/mobile/interfaces/SimulcastConfig.md b/versioned_docs/version-0.29.0/api/web/interfaces/SimulcastConfig.md similarity index 56% rename from versioned_docs/version-0.26.0/api/mobile/interfaces/SimulcastConfig.md rename to versioned_docs/version-0.29.0/api/web/interfaces/SimulcastConfig.md index dbec162b..953fa22c 100644 --- a/versioned_docs/version-0.26.0/api/mobile/interfaces/SimulcastConfig.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/SimulcastConfig.md @@ -1,6 +1,6 @@ # Interface: SimulcastConfig -Defined in: packages/ts-client/dist/index.d.mts:197 +Defined in: ts-client/dist/index.d.mts:197 ## Properties @@ -8,7 +8,7 @@ Defined in: packages/ts-client/dist/index.d.mts:197 > **disabledVariants**: [`Variant`](../enumerations/Variant.md)[] -Defined in: packages/ts-client/dist/index.d.mts:200 +Defined in: ts-client/dist/index.d.mts:200 *** @@ -16,7 +16,7 @@ Defined in: packages/ts-client/dist/index.d.mts:200 > **enabled**: `boolean` -Defined in: packages/ts-client/dist/index.d.mts:198 +Defined in: ts-client/dist/index.d.mts:198 *** @@ -24,4 +24,4 @@ Defined in: packages/ts-client/dist/index.d.mts:198 > **enabledVariants**: [`Variant`](../enumerations/Variant.md)[] -Defined in: packages/ts-client/dist/index.d.mts:199 +Defined in: ts-client/dist/index.d.mts:199 diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamStreamerResult.md b/versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamStreamerResult.md similarity index 69% rename from versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamStreamerResult.md rename to versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamStreamerResult.md index 5f8161cb..cb2a8625 100644 --- a/versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamStreamerResult.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamStreamerResult.md @@ -1,6 +1,6 @@ # Interface: UseLivestreamStreamerResult -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L28) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L28) ## Properties @@ -8,7 +8,7 @@ Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:28](https://github. > **connect**: (`inputs`, `urlOverride?`) => `Promise`\<`void`\> -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L35) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L35) Callback used to start publishing the selected audio and video media streams. @@ -33,7 +33,7 @@ Calling [connect](#connect) multiple times will have the effect of only publishi > **disconnect**: () => `void` -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:37](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L37) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:37](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L37) Callback to stop publishing anything previously published with [connect](#connect) @@ -47,7 +47,7 @@ Callback to stop publishing anything previously published with [connect](#connec > **error**: `null` \| `LivestreamError` -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:39](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L39) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:39](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L39) Any errors encountered in [connect](#connect) will populate this field @@ -57,6 +57,6 @@ Any errors encountered in [connect](#connect) will populate this field > **isConnected**: `boolean` -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L41) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L41) Utility flag which indicates the current connection status diff --git a/versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamViewerResult.md b/versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamViewerResult.md similarity index 66% rename from versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamViewerResult.md rename to versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamViewerResult.md index 144a3205..ec9fd7ff 100644 --- a/versioned_docs/version-0.26.0/api/web/interfaces/UseLivestreamViewerResult.md +++ b/versioned_docs/version-0.29.0/api/web/interfaces/UseLivestreamViewerResult.md @@ -1,6 +1,6 @@ # Interface: UseLivestreamViewerResult -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L12) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L12) ## Properties @@ -8,7 +8,7 @@ Defined in: [react-client/src/hooks/useLivestreamViewer.ts:12](https://github.co > **connect**: (`config`, `url?`) => `Promise`\<`void`\> -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L20) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L20) Callback to start receiving a livestream. If the livestream is private, provide `token`. @@ -31,7 +31,7 @@ If the livestream is public, provide `streamId`. > **disconnect**: () => `void` -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L22) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L22) Callback used to disconnect from a stream previously connected to with [connect](#connect) @@ -45,7 +45,7 @@ Callback used to disconnect from a stream previously connected to with [connect] > **error**: `null` \| `LivestreamError` -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L24) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L24) Any errors encountered in [connect](#connect) will be present in this field. @@ -55,7 +55,7 @@ Any errors encountered in [connect](#connect) will be present in this field. > **getStatistics**: () => `Promise`\<`undefined` \| `RTCStatsReport`\> -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L27) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L27) #### Returns @@ -67,7 +67,7 @@ Defined in: [react-client/src/hooks/useLivestreamViewer.ts:27](https://github.co > **isConnected**: `boolean` -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L26) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L26) Utility flag which indicates the current connection status @@ -77,6 +77,6 @@ Utility flag which indicates the current connection status > **stream**: `null` \| `MediaStream` -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L14) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L14) The received livestream media diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/AuthErrorReason.md b/versioned_docs/version-0.29.0/api/web/type-aliases/AuthErrorReason.md similarity index 66% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/AuthErrorReason.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/AuthErrorReason.md index 5d7ef8f5..5ce791b0 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/AuthErrorReason.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/AuthErrorReason.md @@ -2,4 +2,4 @@ > **AuthErrorReason** = *typeof* `AUTH_ERROR_REASONS`\[`number`\] -Defined in: packages/ts-client/dist/index.d.mts:5 +Defined in: ts-client/dist/index.d.mts:5 diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/BandwidthLimits.md b/versioned_docs/version-0.29.0/api/web/type-aliases/BandwidthLimits.md new file mode 100644 index 00000000..b333c052 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/BandwidthLimits.md @@ -0,0 +1,21 @@ +# Type Alias: BandwidthLimits + +> **BandwidthLimits** = `object` + +Defined in: [react-client/src/types/public.ts:73](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L73) + +## Properties + +### simulcast + +> **simulcast**: [`SimulcastBandwidthLimits`](SimulcastBandwidthLimits.md) + +Defined in: [react-client/src/types/public.ts:73](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L73) + +*** + +### singleStream + +> **singleStream**: `number` + +Defined in: [react-client/src/types/public.ts:73](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L73) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/Brand.md b/versioned_docs/version-0.29.0/api/web/type-aliases/Brand.md similarity index 55% rename from versioned_docs/version-0.26.0/api/web/type-aliases/Brand.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/Brand.md index 729e5cba..423f44f7 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/Brand.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/Brand.md @@ -2,7 +2,7 @@ > **Brand**\<`T`, `TBrand`\> = `T` & `object` -Defined in: [react-client/src/types/public.ts:81](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L81) +Defined in: [react-client/src/types/public.ts:84](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L84) ## Type declaration diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/ConnectStreamerConfig.md b/versioned_docs/version-0.29.0/api/web/type-aliases/ConnectStreamerConfig.md similarity index 57% rename from versioned_docs/version-0.26.0/api/web/type-aliases/ConnectStreamerConfig.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/ConnectStreamerConfig.md index b384f7e3..44a0ca85 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/ConnectStreamerConfig.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/ConnectStreamerConfig.md @@ -2,7 +2,7 @@ > **ConnectStreamerConfig** = `object` -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L21) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L21) ## Properties @@ -10,7 +10,7 @@ Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:21](https://github. > **inputs**: [`StreamerInputs`](StreamerInputs.md) -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L22) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L22) *** @@ -18,6 +18,6 @@ Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:22](https://github. > **token**: `string` -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L24) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L24) Streamer token used to authenticate with Fishjam diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/ConnectViewerConfig.md b/versioned_docs/version-0.29.0/api/web/type-aliases/ConnectViewerConfig.md similarity index 65% rename from versioned_docs/version-0.26.0/api/web/type-aliases/ConnectViewerConfig.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/ConnectViewerConfig.md index de80f962..a351ff13 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/ConnectViewerConfig.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/ConnectViewerConfig.md @@ -2,4 +2,4 @@ > **ConnectViewerConfig** = \{ `streamId?`: `never`; `token`: `string`; \} \| \{ `streamId`: `string`; `token?`: `never`; \} -Defined in: [react-client/src/hooks/useLivestreamViewer.ts:7](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamViewer.ts#L7) +Defined in: [react-client/src/hooks/useLivestreamViewer.ts:7](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamViewer.ts#L7) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/CustomSource.md b/versioned_docs/version-0.29.0/api/web/type-aliases/CustomSource.md new file mode 100644 index 00000000..80a62ce9 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/CustomSource.md @@ -0,0 +1,40 @@ +# Type Alias: CustomSource\ + +> **CustomSource**\<`T`\> = `object` + +Defined in: [react-client/src/types/public.ts:86](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L86) + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` *extends* `string` | + +## Properties + +### id + +> **id**: `T` + +Defined in: [react-client/src/types/public.ts:87](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L87) + +*** + +### stream? + +> `optional` **stream**: `MediaStream` + +Defined in: [react-client/src/types/public.ts:89](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L89) + +*** + +### trackIds? + +> `optional` **trackIds**: `object` + +Defined in: [react-client/src/types/public.ts:88](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L88) + +| Name | Type | +| ------ | ------ | +| `audioId?` | `string` | +| `videoId?` | `string` | diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DataCallback.md b/versioned_docs/version-0.29.0/api/web/type-aliases/DataCallback.md similarity index 84% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/DataCallback.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/DataCallback.md index 08f6d1a0..2625caca 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/DataCallback.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/DataCallback.md @@ -2,7 +2,7 @@ > **DataCallback** = (`data`) => `void` -Defined in: packages/ts-client/dist/index.d.mts:512 +Defined in: ts-client/dist/index.d.mts:512 Callback type for receiving data from a data channel. diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/DeviceError.md b/versioned_docs/version-0.29.0/api/web/type-aliases/DeviceError.md similarity index 51% rename from versioned_docs/version-0.26.0/api/web/type-aliases/DeviceError.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/DeviceError.md index b82676f4..05f61dd4 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/DeviceError.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/DeviceError.md @@ -2,4 +2,4 @@ > **DeviceError** = \{ `name`: `"OverconstrainedError"`; \} \| \{ `name`: `"NotAllowedError"`; \} \| \{ `name`: `"NotFoundError"`; \} \| \{ `name`: `"UNHANDLED_ERROR"`; \} -Defined in: [react-client/src/types/public.ts:74](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L74) +Defined in: [react-client/src/types/public.ts:77](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L77) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/DeviceItem.md b/versioned_docs/version-0.29.0/api/web/type-aliases/DeviceItem.md new file mode 100644 index 00000000..9f677d32 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/DeviceItem.md @@ -0,0 +1,21 @@ +# Type Alias: DeviceItem + +> **DeviceItem** = `object` + +Defined in: [react-client/src/types/public.ts:58](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L58) + +## Properties + +### deviceId + +> **deviceId**: `string` + +Defined in: [react-client/src/types/public.ts:58](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L58) + +*** + +### label + +> **label**: `string` + +Defined in: [react-client/src/types/public.ts:58](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L58) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesResult.md b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesResult.md similarity index 50% rename from versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesResult.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesResult.md index a36ca9d6..d4d0d6e3 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesResult.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesResult.md @@ -2,7 +2,7 @@ > **InitializeDevicesResult** = `object` -Defined in: [react-client/src/types/public.ts:11](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L11) +Defined in: [react-client/src/types/public.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L12) ## Properties @@ -10,7 +10,7 @@ Defined in: [react-client/src/types/public.ts:11](https://github.com/fishjam-clo > **errors**: \{ `audio`: [`DeviceError`](DeviceError.md) \| `null`; `video`: [`DeviceError`](DeviceError.md) \| `null`; \} \| `null` -Defined in: [react-client/src/types/public.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L14) +Defined in: [react-client/src/types/public.ts:15](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L15) *** @@ -18,7 +18,7 @@ Defined in: [react-client/src/types/public.ts:14](https://github.com/fishjam-clo > **status**: [`InitializeDevicesStatus`](InitializeDevicesStatus.md) -Defined in: [react-client/src/types/public.ts:12](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L12) +Defined in: [react-client/src/types/public.ts:13](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L13) *** @@ -26,4 +26,4 @@ Defined in: [react-client/src/types/public.ts:12](https://github.com/fishjam-clo > **stream**: `MediaStream` \| `null` -Defined in: [react-client/src/types/public.ts:13](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L13) +Defined in: [react-client/src/types/public.ts:14](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L14) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesSettings.md b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesSettings.md similarity index 79% rename from versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesSettings.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesSettings.md index db551b33..9ee06bfc 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/InitializeDevicesSettings.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesSettings.md @@ -2,7 +2,7 @@ > **InitializeDevicesSettings** = `object` -Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) +Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) ## Properties @@ -10,7 +10,7 @@ Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](http > `optional` **enableAudio**: `boolean` -Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) +Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) *** @@ -18,4 +18,4 @@ Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](http > `optional` **enableVideo**: `boolean` -Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) +Defined in: [react-client/src/hooks/internal/devices/useMediaDevices.ts:16](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/internal/devices/useMediaDevices.ts#L16) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesStatus.md b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesStatus.md new file mode 100644 index 00000000..14676024 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/InitializeDevicesStatus.md @@ -0,0 +1,5 @@ +# Type Alias: InitializeDevicesStatus + +> **InitializeDevicesStatus** = `"initialized"` \| `"failed"` \| `"initialized_with_errors"` \| `"already_initialized"` + +Defined in: [react-client/src/types/public.ts:10](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L10) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/JoinErrorReason.md b/versioned_docs/version-0.29.0/api/web/type-aliases/JoinErrorReason.md similarity index 63% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/JoinErrorReason.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/JoinErrorReason.md index 08b6676b..16f20741 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/JoinErrorReason.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/JoinErrorReason.md @@ -2,4 +2,4 @@ > **JoinErrorReason** = *typeof* `JOIN_ERRORS`\[`number`\] -Defined in: packages/ts-client/dist/index.d.mts:937 +Defined in: ts-client/dist/index.d.mts:941 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Metadata.md b/versioned_docs/version-0.29.0/api/web/type-aliases/Metadata.md similarity index 76% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/Metadata.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/Metadata.md index f8187fda..956ea26c 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/Metadata.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/Metadata.md @@ -2,7 +2,7 @@ > **Metadata**\<`PeerMetadata`, `ServerMetadata`\> = `object` -Defined in: packages/ts-client/dist/index.d.mts:968 +Defined in: ts-client/dist/index.d.mts:972 ## Type Parameters @@ -17,7 +17,7 @@ Defined in: packages/ts-client/dist/index.d.mts:968 > **peer**: `PeerMetadata` -Defined in: packages/ts-client/dist/index.d.mts:969 +Defined in: ts-client/dist/index.d.mts:973 *** @@ -25,4 +25,4 @@ Defined in: packages/ts-client/dist/index.d.mts:969 > **server**: `ServerMetadata` -Defined in: packages/ts-client/dist/index.d.mts:970 +Defined in: ts-client/dist/index.d.mts:974 diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/MiddlewareResult.md b/versioned_docs/version-0.29.0/api/web/type-aliases/MiddlewareResult.md new file mode 100644 index 00000000..ec6d0da5 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/MiddlewareResult.md @@ -0,0 +1,25 @@ +# Type Alias: MiddlewareResult + +> **MiddlewareResult** = `object` + +Defined in: [react-client/src/types/public.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L35) + +## Properties + +### onClear()? + +> `optional` **onClear**: () => `void` + +Defined in: [react-client/src/types/public.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L35) + +#### Returns + +`void` + +*** + +### track + +> **track**: `MediaStreamTrack` + +Defined in: [react-client/src/types/public.ts:35](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L35) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/MoqAccess.md b/versioned_docs/version-0.29.0/api/web/type-aliases/MoqAccess.md new file mode 100644 index 00000000..d34cc553 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/MoqAccess.md @@ -0,0 +1,21 @@ +# Type Alias: MoqAccess + +> **MoqAccess** = `object` + +Defined in: [react-client/src/hooks/useSandbox.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L18) + +## Properties + +### connectionUrl + +> **connectionUrl**: `string` + +Defined in: [react-client/src/hooks/useSandbox.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L19) + +*** + +### token + +> **token**: `string` + +Defined in: [react-client/src/hooks/useSandbox.ts:20](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L20) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/PeerId.md b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerId.md new file mode 100644 index 00000000..f00ee28e --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerId.md @@ -0,0 +1,5 @@ +# Type Alias: PeerId + +> **PeerId** = [`Brand`](Brand.md)\<`string`, `"PeerId"`\> + +Defined in: [react-client/src/types/public.ts:19](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L19) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerStatus.md b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerStatus.md similarity index 68% rename from versioned_docs/version-0.26.0/api/web/type-aliases/PeerStatus.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/PeerStatus.md index 06487a8f..b7e0a18b 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/PeerStatus.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerStatus.md @@ -2,7 +2,7 @@ > **PeerStatus** = `"connecting"` \| `"connected"` \| `"error"` \| `"idle"` -Defined in: [react-client/src/types/public.ts:53](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L53) +Defined in: [react-client/src/types/public.ts:56](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L56) Represents the possible statuses of a peer connection. diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/PeerWithTracks.md b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerWithTracks.md new file mode 100644 index 00000000..3a3edc4a --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/PeerWithTracks.md @@ -0,0 +1,85 @@ +# Type Alias: PeerWithTracks\ + +> **PeerWithTracks**\<`PeerMetadata`, `ServerMetadata`, `T`\> = `object` + +Defined in: [react-client/src/hooks/usePeers.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L22) + +## Type Parameters + +| Type Parameter | Default type | Description | +| ------ | ------ | ------ | +| `PeerMetadata` | - | Type of metadata set by peer while connecting to a room. | +| `ServerMetadata` | - | Type of metadata set by the server while creating a peer. | +| `T` *extends* [`Track`](Track.md) | [`Track`](Track.md) | - | + +## Properties + +### cameraTrack? + +> `optional` **cameraTrack**: `T` + +Defined in: [react-client/src/hooks/usePeers.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L26) + +*** + +### customAudioTracks + +> **customAudioTracks**: `T`[] + +Defined in: [react-client/src/hooks/usePeers.ts:31](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L31) + +*** + +### customVideoTracks + +> **customVideoTracks**: `T`[] + +Defined in: [react-client/src/hooks/usePeers.ts:30](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L30) + +*** + +### id + +> **id**: [`PeerId`](PeerId.md) + +Defined in: [react-client/src/hooks/usePeers.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L23) + +*** + +### metadata? + +> `optional` **metadata**: [`Metadata`](Metadata.md)\<`PeerMetadata`, `ServerMetadata`\> + +Defined in: [react-client/src/hooks/usePeers.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L24) + +*** + +### microphoneTrack? + +> `optional` **microphoneTrack**: `T` + +Defined in: [react-client/src/hooks/usePeers.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L27) + +*** + +### screenShareAudioTrack? + +> `optional` **screenShareAudioTrack**: `T` + +Defined in: [react-client/src/hooks/usePeers.ts:29](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L29) + +*** + +### screenShareVideoTrack? + +> `optional` **screenShareVideoTrack**: `T` + +Defined in: [react-client/src/hooks/usePeers.ts:28](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L28) + +*** + +### tracks + +> **tracks**: `T`[] + +Defined in: [react-client/src/hooks/usePeers.ts:25](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/usePeers.ts#L25) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/PersistLastDeviceHandlers.md b/versioned_docs/version-0.29.0/api/web/type-aliases/PersistLastDeviceHandlers.md new file mode 100644 index 00000000..16415428 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/PersistLastDeviceHandlers.md @@ -0,0 +1,42 @@ +# Type Alias: PersistLastDeviceHandlers + +> **PersistLastDeviceHandlers** = `object` + +Defined in: [react-client/src/types/public.ts:60](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L60) + +## Properties + +### getLastDevice() + +> **getLastDevice**: (`deviceType`) => `MediaDeviceInfo` \| `null` + +Defined in: [react-client/src/types/public.ts:61](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L61) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `deviceType` | `"audio"` \| `"video"` | + +#### Returns + +`MediaDeviceInfo` \| `null` + +*** + +### saveLastDevice() + +> **saveLastDevice**: (`info`, `deviceType`) => `void` + +Defined in: [react-client/src/types/public.ts:62](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L62) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `info` | `MediaDeviceInfo` | +| `deviceType` | `"audio"` \| `"video"` | + +#### Returns + +`void` diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectConfig.md b/versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectConfig.md similarity index 56% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectConfig.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectConfig.md index 9869fcde..ef54d500 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectConfig.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectConfig.md @@ -2,7 +2,7 @@ > **ReconnectConfig** = `object` -Defined in: packages/ts-client/dist/index.d.mts:941 +Defined in: ts-client/dist/index.d.mts:945 ## Properties @@ -10,7 +10,7 @@ Defined in: packages/ts-client/dist/index.d.mts:941 > `optional` **addTracksOnReconnect**: `boolean` -Defined in: packages/ts-client/dist/index.d.mts:945 +Defined in: ts-client/dist/index.d.mts:949 *** @@ -18,7 +18,7 @@ Defined in: packages/ts-client/dist/index.d.mts:945 > `optional` **delay**: `number` -Defined in: packages/ts-client/dist/index.d.mts:944 +Defined in: ts-client/dist/index.d.mts:948 *** @@ -26,7 +26,7 @@ Defined in: packages/ts-client/dist/index.d.mts:944 > `optional` **initialDelay**: `number` -Defined in: packages/ts-client/dist/index.d.mts:943 +Defined in: ts-client/dist/index.d.mts:947 *** @@ -34,4 +34,4 @@ Defined in: packages/ts-client/dist/index.d.mts:943 > `optional` **maxAttempts**: `number` -Defined in: packages/ts-client/dist/index.d.mts:942 +Defined in: ts-client/dist/index.d.mts:946 diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectionStatus.md b/versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectionStatus.md similarity index 66% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectionStatus.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectionStatus.md index 9d23a0a7..344a388a 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/ReconnectionStatus.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/ReconnectionStatus.md @@ -2,4 +2,4 @@ > **ReconnectionStatus** = `"reconnecting"` \| `"idle"` \| `"error"` -Defined in: packages/ts-client/dist/index.d.mts:940 +Defined in: ts-client/dist/index.d.mts:944 diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/RemoteTrack.md b/versioned_docs/version-0.29.0/api/web/type-aliases/RemoteTrack.md new file mode 100644 index 00000000..1de834f0 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/RemoteTrack.md @@ -0,0 +1,29 @@ +# Type Alias: RemoteTrack + +> **RemoteTrack** = [`Track`](Track.md) & `object` + +Defined in: [react-client/src/types/public.ts:29](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L29) + +## Type declaration + +### encoding? + +> `optional` **encoding**: [`Variant`](../enumerations/Variant.md) + +### encodingReason? + +> `optional` **encodingReason**: `EncodingReason` + +### setReceivedQuality() + +> **setReceivedQuality**: (`quality`) => `void` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `quality` | [`Variant`](../enumerations/Variant.md) | + +#### Returns + +`void` diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/RoomType.md b/versioned_docs/version-0.29.0/api/web/type-aliases/RoomType.md new file mode 100644 index 00000000..4ca490b6 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/RoomType.md @@ -0,0 +1,5 @@ +# Type Alias: RoomType + +> **RoomType** = `"conference"` \| `"livestream"` \| `"audio_only"` + +Defined in: [react-client/src/hooks/useSandbox.ts:27](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L27) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimit.md b/versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimit.md similarity index 87% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimit.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimit.md index f812c466..91b20381 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/SimulcastBandwidthLimit.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimit.md @@ -2,7 +2,7 @@ > **SimulcastBandwidthLimit** = `Map`\<[`Variant`](../enumerations/Variant.md), `BandwidthLimit`\> -Defined in: packages/ts-client/dist/index.d.mts:252 +Defined in: ts-client/dist/index.d.mts:252 Type describing bandwidth limit for simulcast track. It is a mapping (encoding => BandwidthLimit). diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimits.md b/versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimits.md new file mode 100644 index 00000000..60566a77 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/SimulcastBandwidthLimits.md @@ -0,0 +1,29 @@ +# Type Alias: SimulcastBandwidthLimits + +> **SimulcastBandwidthLimits** = `object` + +Defined in: [react-client/src/types/public.ts:65](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L65) + +## Properties + +### 1 + +> **1**: `number` + +Defined in: [react-client/src/types/public.ts:66](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L66) + +*** + +### 2 + +> **2**: `number` + +Defined in: [react-client/src/types/public.ts:67](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L67) + +*** + +### 3 + +> **3**: `number` + +Defined in: [react-client/src/types/public.ts:68](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L68) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/StreamConfig.md b/versioned_docs/version-0.29.0/api/web/type-aliases/StreamConfig.md new file mode 100644 index 00000000..ee900ba0 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/StreamConfig.md @@ -0,0 +1,13 @@ +# Type Alias: StreamConfig + +> **StreamConfig** = `object` + +Defined in: [react-client/src/types/public.ts:71](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L71) + +## Properties + +### sentQualities? + +> `optional` **sentQualities**: [`Variant`](../enumerations/Variant.md)[] \| `false` + +Defined in: [react-client/src/types/public.ts:71](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L71) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/StreamerInputs.md b/versioned_docs/version-0.29.0/api/web/type-aliases/StreamerInputs.md similarity index 87% rename from versioned_docs/version-0.26.0/api/web/type-aliases/StreamerInputs.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/StreamerInputs.md index 124c48e4..f9345671 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/StreamerInputs.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/StreamerInputs.md @@ -2,7 +2,7 @@ > **StreamerInputs** = \{ `audio?`: `MediaStream` \| `null`; `video`: `MediaStream`; \} \| \{ `audio`: `MediaStream`; `video?`: `null`; \} -Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:8](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/useLivestreamStreamer.ts#L8) +Defined in: [react-client/src/hooks/useLivestreamStreamer.ts:8](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useLivestreamStreamer.ts#L8) ## Type declaration diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/Track.md b/versioned_docs/version-0.29.0/api/web/type-aliases/Track.md new file mode 100644 index 00000000..ff3c4137 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/Track.md @@ -0,0 +1,45 @@ +# Type Alias: Track + +> **Track** = `object` + +Defined in: [react-client/src/types/public.ts:21](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L21) + +## Properties + +### metadata? + +> `optional` **metadata**: `TrackMetadata` + +Defined in: [react-client/src/types/public.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L24) + +*** + +### simulcastConfig + +> **simulcastConfig**: [`SimulcastConfig`](../interfaces/SimulcastConfig.md) \| `null` + +Defined in: [react-client/src/types/public.ts:25](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L25) + +*** + +### stream + +> **stream**: `MediaStream` \| `null` + +Defined in: [react-client/src/types/public.ts:22](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L22) + +*** + +### track + +> **track**: `MediaStreamTrack` \| `null` + +Defined in: [react-client/src/types/public.ts:26](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L26) + +*** + +### trackId + +> **trackId**: [`TrackId`](TrackId.md) + +Defined in: [react-client/src/types/public.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L23) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackBandwidthLimit.md b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackBandwidthLimit.md similarity index 85% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackBandwidthLimit.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/TrackBandwidthLimit.md index 80ee870a..8ae1c104 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TrackBandwidthLimit.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackBandwidthLimit.md @@ -2,7 +2,7 @@ > **TrackBandwidthLimit** = `BandwidthLimit` \| [`SimulcastBandwidthLimit`](SimulcastBandwidthLimit.md) -Defined in: packages/ts-client/dist/index.d.mts:257 +Defined in: ts-client/dist/index.d.mts:257 Type describing bandwidth limitation of a Track, including simulcast and non-simulcast tracks. A sum type of `BandwidthLimit` and `SimulcastBandwidthLimit` diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/TrackId.md b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackId.md new file mode 100644 index 00000000..44a5b0b5 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackId.md @@ -0,0 +1,5 @@ +# Type Alias: TrackId + +> **TrackId** = [`Brand`](Brand.md)\<`string`, `"TrackId"`\> + +Defined in: [react-client/src/types/public.ts:18](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L18) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/TrackMiddleware.md b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackMiddleware.md new file mode 100644 index 00000000..64d090d1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/TrackMiddleware.md @@ -0,0 +1,5 @@ +# Type Alias: TrackMiddleware + +> **TrackMiddleware** = (`track`) => [`MiddlewareResult`](MiddlewareResult.md) \| `Promise`\<[`MiddlewareResult`](MiddlewareResult.md)\> \| `null` + +Defined in: [react-client/src/types/public.ts:36](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L36) diff --git a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddleware.md b/versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddleware.md similarity index 72% rename from versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddleware.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddleware.md index 1f74a941..d7b1a676 100644 --- a/versioned_docs/version-0.26.0/api/mobile/type-aliases/TracksMiddleware.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddleware.md @@ -2,7 +2,7 @@ > **TracksMiddleware** = (`videoTrack`, `audioTrack`) => [`TracksMiddlewareResult`](TracksMiddlewareResult.md) \| `Promise`\<[`TracksMiddlewareResult`](TracksMiddlewareResult.md)\> -Defined in: packages/react-client/dist/types/public.d.ts:33 +Defined in: [react-client/src/types/public.ts:43](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L43) ## Parameters diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddlewareResult.md b/versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddlewareResult.md new file mode 100644 index 00000000..a2b6c4f1 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/TracksMiddlewareResult.md @@ -0,0 +1,33 @@ +# Type Alias: TracksMiddlewareResult + +> **TracksMiddlewareResult** = `object` + +Defined in: [react-client/src/types/public.ts:38](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L38) + +## Properties + +### audioTrack + +> **audioTrack**: `MediaStreamTrack` \| `null` + +Defined in: [react-client/src/types/public.ts:40](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L40) + +*** + +### onClear() + +> **onClear**: () => `void` + +Defined in: [react-client/src/types/public.ts:41](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L41) + +#### Returns + +`void` + +*** + +### videoTrack + +> **videoTrack**: `MediaStreamTrack` + +Defined in: [react-client/src/types/public.ts:39](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L39) diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/UseDataChannelResult.md b/versioned_docs/version-0.29.0/api/web/type-aliases/UseDataChannelResult.md similarity index 57% rename from versioned_docs/version-0.26.0/api/web/type-aliases/UseDataChannelResult.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/UseDataChannelResult.md index 2e29ff53..c2bcce73 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/UseDataChannelResult.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/UseDataChannelResult.md @@ -2,7 +2,7 @@ > **UseDataChannelResult** = `object` -Defined in: [react-client/src/types/public.ts:89](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L89) +Defined in: [react-client/src/types/public.ts:92](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L92) ## Properties @@ -10,7 +10,7 @@ Defined in: [react-client/src/types/public.ts:89](https://github.com/fishjam-clo > **dataChannelError**: `Error` \| `null` -Defined in: [react-client/src/types/public.ts:122](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L122) +Defined in: [react-client/src/types/public.ts:125](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L125) Error that occurred during data publisher operations, or null if no error. @@ -20,7 +20,7 @@ Error that occurred during data publisher operations, or null if no error. > **dataChannelLoading**: `boolean` -Defined in: [react-client/src/types/public.ts:118](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L118) +Defined in: [react-client/src/types/public.ts:121](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L121) Whether data channels are being initialized. @@ -30,7 +30,7 @@ Whether data channels are being initialized. > **dataChannelReady**: `boolean` -Defined in: [react-client/src/types/public.ts:114](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L114) +Defined in: [react-client/src/types/public.ts:117](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L117) Whether data channels are connected and ready to send data. Resets to false on disconnect. @@ -41,7 +41,7 @@ Resets to false on disconnect. > **initializeDataChannel**: () => `void` -Defined in: [react-client/src/types/public.ts:95](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L95) +Defined in: [react-client/src/types/public.ts:98](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L98) Initializes the data channel. @@ -57,7 +57,7 @@ Requires that the fishjam client is already connected. > **publishData**: (`payload`, `options`) => `void` -Defined in: [react-client/src/types/public.ts:101](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L101) +Defined in: [react-client/src/types/public.ts:104](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L104) Sends binary data through a data channel. @@ -78,7 +78,7 @@ Sends binary data through a data channel. > **subscribeData**: (`callback`, `options`) => () => `void` -Defined in: [react-client/src/types/public.ts:109](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/types/public.ts#L109) +Defined in: [react-client/src/types/public.ts:112](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/types/public.ts#L112) Subscribe to incoming data on a data channel. Can be called before or after channel creation. diff --git a/versioned_docs/version-0.26.0/api/web/type-aliases/UseInitializeDevicesParams.md b/versioned_docs/version-0.29.0/api/web/type-aliases/UseInitializeDevicesParams.md similarity index 58% rename from versioned_docs/version-0.26.0/api/web/type-aliases/UseInitializeDevicesParams.md rename to versioned_docs/version-0.29.0/api/web/type-aliases/UseInitializeDevicesParams.md index 2fba2e68..a709b494 100644 --- a/versioned_docs/version-0.26.0/api/web/type-aliases/UseInitializeDevicesParams.md +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/UseInitializeDevicesParams.md @@ -2,7 +2,7 @@ > **UseInitializeDevicesParams** = `object` -Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:5](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L5) +Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:5](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L5) ## Properties @@ -10,7 +10,7 @@ Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:5](https://g > `optional` **enableAudio**: `boolean` -Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:7](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L7) +Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:7](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L7) *** @@ -18,4 +18,4 @@ Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:7](https://g > `optional` **enableVideo**: `boolean` -Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:6](https://github.com/fishjam-cloud/web-client-sdk/blob/ae228527ec61ba2db2a61a590b4c999f065dcfeb/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L6) +Defined in: [react-client/src/hooks/devices/useInitializeDevices.ts:6](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/devices/useInitializeDevices.ts#L6) diff --git a/versioned_docs/version-0.29.0/api/web/type-aliases/UseSandboxProps.md b/versioned_docs/version-0.29.0/api/web/type-aliases/UseSandboxProps.md new file mode 100644 index 00000000..c2935006 --- /dev/null +++ b/versioned_docs/version-0.29.0/api/web/type-aliases/UseSandboxProps.md @@ -0,0 +1,13 @@ +# Type Alias: UseSandboxProps + +> **UseSandboxProps** = `object` + +Defined in: [react-client/src/hooks/useSandbox.ts:23](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L23) + +## Properties + +### sandboxApiUrl + +> **sandboxApiUrl**: `string` + +Defined in: [react-client/src/hooks/useSandbox.ts:24](https://github.com/fishjam-cloud/web-client-sdk/blob/90ab3e9c91fcc1e76750599611c08dadb447fd27/packages/react-client/src/hooks/useSandbox.ts#L24) diff --git a/versioned_docs/version-0.26.0/api/web/typedoc-sidebar.cjs b/versioned_docs/version-0.29.0/api/web/typedoc-sidebar.cjs similarity index 64% rename from versioned_docs/version-0.26.0/api/web/typedoc-sidebar.cjs rename to versioned_docs/version-0.29.0/api/web/typedoc-sidebar.cjs index f8afae72..196f2f8c 100644 --- a/versioned_docs/version-0.26.0/api/web/typedoc-sidebar.cjs +++ b/versioned_docs/version-0.29.0/api/web/typedoc-sidebar.cjs @@ -1,4 +1,4 @@ // @ts-check /** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ -const typedocSidebar = {items:[{type:"category",label:"Connection",items:[{type:"doc",id:"api/web/functions/useConnection",label:"useConnection"},{type:"doc",id:"api/web/functions/useDataChannel",label:"useDataChannel"},{type:"doc",id:"api/web/functions/usePeers",label:"usePeers"},{type:"doc",id:"api/web/functions/useUpdatePeerMetadata",label:"useUpdatePeerMetadata"},{type:"doc",id:"api/web/functions/useVAD",label:"useVAD"},{type:"doc",id:"api/web/type-aliases/Metadata",label:"Metadata"}]},{type:"category",label:"Devices",items:[{type:"doc",id:"api/web/functions/useCamera",label:"useCamera"},{type:"doc",id:"api/web/functions/useInitializeDevices",label:"useInitializeDevices"},{type:"doc",id:"api/web/functions/useMicrophone",label:"useMicrophone"},{type:"doc",id:"api/web/functions/useScreenShare",label:"useScreenShare"}]},{type:"category",label:"Components",items:[{type:"doc",id:"api/web/functions/FishjamProvider",label:"FishjamProvider"},{type:"doc",id:"api/web/interfaces/FishjamProviderProps",label:"FishjamProviderProps"}]},{type:"category",label:"Livestream",items:[{type:"doc",id:"api/web/functions/useLivestreamStreamer",label:"useLivestreamStreamer"},{type:"doc",id:"api/web/functions/useLivestreamViewer",label:"useLivestreamViewer"},{type:"doc",id:"api/web/interfaces/UseLivestreamStreamerResult",label:"UseLivestreamStreamerResult"},{type:"doc",id:"api/web/interfaces/UseLivestreamViewerResult",label:"UseLivestreamViewerResult"},{type:"doc",id:"api/web/type-aliases/ConnectStreamerConfig",label:"ConnectStreamerConfig"},{type:"doc",id:"api/web/type-aliases/StreamerInputs",label:"StreamerInputs"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/web/functions/useCustomSource",label:"useCustomSource"},{type:"doc",id:"api/web/functions/useSandbox",label:"useSandbox"},{type:"doc",id:"api/web/enumerations/Variant",label:"Variant"},{type:"doc",id:"api/web/interfaces/DataChannelOptions",label:"DataChannelOptions"},{type:"doc",id:"api/web/interfaces/JoinRoomConfig",label:"JoinRoomConfig"},{type:"doc",id:"api/web/interfaces/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/web/type-aliases/AuthErrorReason",label:"AuthErrorReason"},{type:"doc",id:"api/web/type-aliases/BandwidthLimits",label:"BandwidthLimits"},{type:"doc",id:"api/web/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/web/type-aliases/ConnectViewerConfig",label:"ConnectViewerConfig"},{type:"doc",id:"api/web/type-aliases/CustomSource",label:"CustomSource"},{type:"doc",id:"api/web/type-aliases/DataCallback",label:"DataCallback"},{type:"doc",id:"api/web/type-aliases/DeviceError",label:"DeviceError"},{type:"doc",id:"api/web/type-aliases/DeviceItem",label:"DeviceItem"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesResult",label:"InitializeDevicesResult"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesSettings",label:"InitializeDevicesSettings"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesStatus",label:"InitializeDevicesStatus"},{type:"doc",id:"api/web/type-aliases/JoinErrorReason",label:"JoinErrorReason"},{type:"doc",id:"api/web/type-aliases/MiddlewareResult",label:"MiddlewareResult"},{type:"doc",id:"api/web/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/web/type-aliases/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/web/type-aliases/PeerWithTracks",label:"PeerWithTracks"},{type:"doc",id:"api/web/type-aliases/PersistLastDeviceHandlers",label:"PersistLastDeviceHandlers"},{type:"doc",id:"api/web/type-aliases/ReconnectConfig",label:"ReconnectConfig"},{type:"doc",id:"api/web/type-aliases/ReconnectionStatus",label:"ReconnectionStatus"},{type:"doc",id:"api/web/type-aliases/RemoteTrack",label:"RemoteTrack"},{type:"doc",id:"api/web/type-aliases/RoomType",label:"RoomType"},{type:"doc",id:"api/web/type-aliases/SimulcastBandwidthLimit",label:"SimulcastBandwidthLimit"},{type:"doc",id:"api/web/type-aliases/SimulcastBandwidthLimits",label:"SimulcastBandwidthLimits"},{type:"doc",id:"api/web/type-aliases/StreamConfig",label:"StreamConfig"},{type:"doc",id:"api/web/type-aliases/Track",label:"Track"},{type:"doc",id:"api/web/type-aliases/TrackBandwidthLimit",label:"TrackBandwidthLimit"},{type:"doc",id:"api/web/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/web/type-aliases/TrackMiddleware",label:"TrackMiddleware"},{type:"doc",id:"api/web/type-aliases/TracksMiddleware",label:"TracksMiddleware"},{type:"doc",id:"api/web/type-aliases/TracksMiddlewareResult",label:"TracksMiddlewareResult"},{type:"doc",id:"api/web/type-aliases/UseDataChannelResult",label:"UseDataChannelResult"},{type:"doc",id:"api/web/type-aliases/UseInitializeDevicesParams",label:"UseInitializeDevicesParams"},{type:"doc",id:"api/web/type-aliases/UseSandboxProps",label:"UseSandboxProps"},{type:"doc",id:"api/web/variables/SimulcastConfig",label:"SimulcastConfig"}]}]}; +const typedocSidebar = {items:[{type:"category",label:"Connection",items:[{type:"doc",id:"api/web/functions/useConnection",label:"useConnection"},{type:"doc",id:"api/web/functions/useDataChannel",label:"useDataChannel"},{type:"doc",id:"api/web/functions/usePeers",label:"usePeers"},{type:"doc",id:"api/web/functions/useUpdatePeerMetadata",label:"useUpdatePeerMetadata"},{type:"doc",id:"api/web/functions/useVAD",label:"useVAD"},{type:"doc",id:"api/web/type-aliases/Metadata",label:"Metadata"}]},{type:"category",label:"Devices",items:[{type:"doc",id:"api/web/functions/useCamera",label:"useCamera"},{type:"doc",id:"api/web/functions/useInitializeDevices",label:"useInitializeDevices"},{type:"doc",id:"api/web/functions/useMicrophone",label:"useMicrophone"},{type:"doc",id:"api/web/functions/useScreenShare",label:"useScreenShare"}]},{type:"category",label:"Components",items:[{type:"doc",id:"api/web/functions/FishjamProvider",label:"FishjamProvider"},{type:"doc",id:"api/web/interfaces/FishjamProviderProps",label:"FishjamProviderProps"}]},{type:"category",label:"Livestream",items:[{type:"doc",id:"api/web/functions/useLivestreamStreamer",label:"useLivestreamStreamer"},{type:"doc",id:"api/web/functions/useLivestreamViewer",label:"useLivestreamViewer"},{type:"doc",id:"api/web/interfaces/UseLivestreamStreamerResult",label:"UseLivestreamStreamerResult"},{type:"doc",id:"api/web/interfaces/UseLivestreamViewerResult",label:"UseLivestreamViewerResult"},{type:"doc",id:"api/web/type-aliases/ConnectStreamerConfig",label:"ConnectStreamerConfig"},{type:"doc",id:"api/web/type-aliases/StreamerInputs",label:"StreamerInputs"}]},{type:"category",label:"Other",items:[{type:"doc",id:"api/web/functions/useCustomSource",label:"useCustomSource"},{type:"doc",id:"api/web/functions/useSandbox",label:"useSandbox"},{type:"doc",id:"api/web/enumerations/Variant",label:"Variant"},{type:"doc",id:"api/web/interfaces/DataChannelOptions",label:"DataChannelOptions"},{type:"doc",id:"api/web/interfaces/JoinRoomConfig",label:"JoinRoomConfig"},{type:"doc",id:"api/web/interfaces/SimulcastConfig",label:"SimulcastConfig"},{type:"doc",id:"api/web/type-aliases/AuthErrorReason",label:"AuthErrorReason"},{type:"doc",id:"api/web/type-aliases/BandwidthLimits",label:"BandwidthLimits"},{type:"doc",id:"api/web/type-aliases/Brand",label:"Brand"},{type:"doc",id:"api/web/type-aliases/ConnectViewerConfig",label:"ConnectViewerConfig"},{type:"doc",id:"api/web/type-aliases/CustomSource",label:"CustomSource"},{type:"doc",id:"api/web/type-aliases/DataCallback",label:"DataCallback"},{type:"doc",id:"api/web/type-aliases/DeviceError",label:"DeviceError"},{type:"doc",id:"api/web/type-aliases/DeviceItem",label:"DeviceItem"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesResult",label:"InitializeDevicesResult"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesSettings",label:"InitializeDevicesSettings"},{type:"doc",id:"api/web/type-aliases/InitializeDevicesStatus",label:"InitializeDevicesStatus"},{type:"doc",id:"api/web/type-aliases/JoinErrorReason",label:"JoinErrorReason"},{type:"doc",id:"api/web/type-aliases/MiddlewareResult",label:"MiddlewareResult"},{type:"doc",id:"api/web/type-aliases/MoqAccess",label:"MoqAccess"},{type:"doc",id:"api/web/type-aliases/PeerId",label:"PeerId"},{type:"doc",id:"api/web/type-aliases/PeerStatus",label:"PeerStatus"},{type:"doc",id:"api/web/type-aliases/PeerWithTracks",label:"PeerWithTracks"},{type:"doc",id:"api/web/type-aliases/PersistLastDeviceHandlers",label:"PersistLastDeviceHandlers"},{type:"doc",id:"api/web/type-aliases/ReconnectConfig",label:"ReconnectConfig"},{type:"doc",id:"api/web/type-aliases/ReconnectionStatus",label:"ReconnectionStatus"},{type:"doc",id:"api/web/type-aliases/RemoteTrack",label:"RemoteTrack"},{type:"doc",id:"api/web/type-aliases/RoomType",label:"RoomType"},{type:"doc",id:"api/web/type-aliases/SimulcastBandwidthLimit",label:"SimulcastBandwidthLimit"},{type:"doc",id:"api/web/type-aliases/SimulcastBandwidthLimits",label:"SimulcastBandwidthLimits"},{type:"doc",id:"api/web/type-aliases/StreamConfig",label:"StreamConfig"},{type:"doc",id:"api/web/type-aliases/Track",label:"Track"},{type:"doc",id:"api/web/type-aliases/TrackBandwidthLimit",label:"TrackBandwidthLimit"},{type:"doc",id:"api/web/type-aliases/TrackId",label:"TrackId"},{type:"doc",id:"api/web/type-aliases/TrackMiddleware",label:"TrackMiddleware"},{type:"doc",id:"api/web/type-aliases/TracksMiddleware",label:"TracksMiddleware"},{type:"doc",id:"api/web/type-aliases/TracksMiddlewareResult",label:"TracksMiddlewareResult"},{type:"doc",id:"api/web/type-aliases/UseDataChannelResult",label:"UseDataChannelResult"},{type:"doc",id:"api/web/type-aliases/UseInitializeDevicesParams",label:"UseInitializeDevicesParams"},{type:"doc",id:"api/web/type-aliases/UseSandboxProps",label:"UseSandboxProps"},{type:"doc",id:"api/web/variables/SimulcastConfig",label:"SimulcastConfig"}]}]}; module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/versioned_docs/version-0.26.0/api/mobile/variables/SimulcastConfig.md b/versioned_docs/version-0.29.0/api/web/variables/SimulcastConfig.md similarity index 70% rename from versioned_docs/version-0.26.0/api/mobile/variables/SimulcastConfig.md rename to versioned_docs/version-0.29.0/api/web/variables/SimulcastConfig.md index 89dcedd7..e8dbd27d 100644 --- a/versioned_docs/version-0.26.0/api/mobile/variables/SimulcastConfig.md +++ b/versioned_docs/version-0.29.0/api/web/variables/SimulcastConfig.md @@ -2,4 +2,4 @@ > **SimulcastConfig**: `MessageFns`\<[`SimulcastConfig`](../interfaces/SimulcastConfig.md)\> -Defined in: packages/ts-client/dist/index.d.mts:197 +Defined in: ts-client/dist/index.d.mts:197 diff --git a/versioned_docs/version-0.26.0/examples/_category_.json b/versioned_docs/version-0.29.0/examples/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/examples/_category_.json rename to versioned_docs/version-0.29.0/examples/_category_.json diff --git a/versioned_docs/version-0.26.0/examples/react-native.mdx b/versioned_docs/version-0.29.0/examples/react-native.mdx similarity index 94% rename from versioned_docs/version-0.26.0/examples/react-native.mdx rename to versioned_docs/version-0.29.0/examples/react-native.mdx index fd2bec5a..762dc616 100644 --- a/versioned_docs/version-0.26.0/examples/react-native.mdx +++ b/versioned_docs/version-0.29.0/examples/react-native.mdx @@ -8,7 +8,7 @@ sidebar_position: 0 _Runnable reference apps demonstrating common Fishjam use cases in React Native_ Each example is a standalone Expo application you can run locally and use as a starting point for your own project. -All examples use `@fishjam-cloud/react-native-client` and require a Fishjam ID from the [Fishjam Dashboard](https://fishjam.io/app). +All examples use `@fishjam-cloud/react-native-client`. You need a Fishjam ID to connect to the media server, and a Sandbox API URL to create rooms and get peer tokens. Get your Fishjam ID from the [Fishjam Dashboard](https://fishjam.io/app), and your Sandbox API URL from the [Sandbox tab](https://fishjam.io/app/sandbox). See [What is the Sandbox API?](../explanation/sandbox-api-concept) for an in-depth explanation. | Example | What it demonstrates | | ----------------------------------------- | --------------------------------------------------------------------- | diff --git a/versioned_docs/version-0.26.0/examples/react.mdx b/versioned_docs/version-0.29.0/examples/react.mdx similarity index 94% rename from versioned_docs/version-0.26.0/examples/react.mdx rename to versioned_docs/version-0.29.0/examples/react.mdx index 66d8e3c5..1666097a 100644 --- a/versioned_docs/version-0.26.0/examples/react.mdx +++ b/versioned_docs/version-0.29.0/examples/react.mdx @@ -8,7 +8,7 @@ sidebar_position: 1 _Runnable reference apps demonstrating common Fishjam use cases in React_ Each example is a standalone React application you can run locally and use as a starting point for your own project. -All examples use `@fishjam-cloud/react-client` and require a Fishjam ID from the [Fishjam Dashboard](https://fishjam.io/app). +All examples use `@fishjam-cloud/react-client`. You need a Fishjam ID to connect to the media server, and a Sandbox API URL to create rooms and get peer tokens. Get your Fishjam ID from the [Fishjam Dashboard](https://fishjam.io/app), and your Sandbox API URL from the [Sandbox tab](https://fishjam.io/app/sandbox). See [What is the Sandbox API?](../explanation/sandbox-api-concept) for an in-depth explanation. | Example | What it demonstrates | | ----------------------------------- | ----------------------------------------------------------------------- | diff --git a/versioned_docs/version-0.26.0/explanation/_category_.json b/versioned_docs/version-0.29.0/explanation/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/explanation/_category_.json rename to versioned_docs/version-0.29.0/explanation/_category_.json diff --git a/versioned_docs/version-0.26.0/explanation/agent-internals.mdx b/versioned_docs/version-0.29.0/explanation/agent-internals.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/agent-internals.mdx rename to versioned_docs/version-0.29.0/explanation/agent-internals.mdx diff --git a/versioned_docs/version-0.26.0/explanation/architecture.mdx b/versioned_docs/version-0.29.0/explanation/architecture.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/architecture.mdx rename to versioned_docs/version-0.29.0/explanation/architecture.mdx diff --git a/versioned_docs/version-0.29.0/explanation/custom-sources.mdx b/versioned_docs/version-0.29.0/explanation/custom-sources.mdx new file mode 100644 index 00000000..ae979605 --- /dev/null +++ b/versioned_docs/version-0.29.0/explanation/custom-sources.mdx @@ -0,0 +1,90 @@ +--- +title: "How custom sources work" +sidebar_position: 10 +description: Concepts behind Fishjam custom sources, including track metadata routing, the publish lifecycle, and the React Native video and audio pipelines. +--- + +# How custom sources work + +[Custom sources](../how-to/client/custom-sources/index.mdx) let an app publish media that Fishjam did not capture itself. This page explains how custom tracks are modeled and routed, when they are published, and how the React Native pipelines move video frames to the encoder without copying pixels and turn pushed PCM into a live audio track. + +## Built-in source, middleware, or custom source? + +Fishjam clients offer three ways to influence what a peer publishes: + +| Approach | What it does | When to use it | +| ----------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| Built-in sources (`useCamera`, `useMicrophone`, `useScreenShare`) | Capture and publish a device the SDK manages end-to-end | Plain camera, microphone or screen sharing | +| [Track middleware](../how-to/client/stream-middleware) | Transforms a built-in track before it is sent (e.g. background blur) | You want the SDK's device handling, but with a processing step in between | +| [Custom sources](../how-to/client/custom-sources/index.mdx) | Publishes a `MediaStream` your app produced entirely on its own | Content that isn't a managed device: renderers, compositors, ML pipelines | + +Capabilities differ slightly per platform: + +| Capability | Web | React Native | +| -------------------------------------- | ---------------------------------- | --------------------------------------------------- | +| Publish any `MediaStream` | ✅ | ✅ | +| Frame-level video injection | via `canvas.captureStream()` | ✅ native buffer forwarding / pooled render targets | +| Custom audio | ✅ any audio track | ✅ PCM pushed through `useCustomAudioSource` | +| GPU rendering into the published video | ✅ WebGPU/WebGL via canvas capture | ✅ WebGPU toolkit with zero-copy camera import | + +## Streams and source IDs + +A custom source is a `MediaStream` registered under a stable **source ID** with `useCustomSource(sourceId)`. The ID makes the source addressable: + +- Every `useCustomSource` call with the same ID, in any component, returns the same state, so one component can produce the stream while another controls or renders it. +- A peer can publish any number of custom sources, each under its own ID. + +When the stream is published, Fishjam takes its first video track and first audio track (whichever are present) and publishes them with the track metadata types `customVideo` and `customAudio`. The metadata is how the receiving side tells custom tracks apart from camera, microphone and screen-share tracks: `usePeers` groups each peer's tracks by type and exposes custom tracks in the `customVideoTracks` and `customAudioTracks` arrays. + +## The publish lifecycle + +`setStream` is asynchronous and connection-aware: + +- Tracks are added to the session only while the peer is connected. A stream set before joining is stored as pending and published on connect. +- On disconnect, sources return to pending; after a reconnect they are re-published automatically. +- Calls to `setStream` are serialized: replacing one stream with another in quick succession cannot interleave, and a failed call does not affect subsequent ones. +- `setStream(null)` unpublishes and forgets the source. The tracks themselves are not stopped; the producer of the stream owns them. + +## The React Native media pipelines + +On the web, the browser can produce a `MediaStream` from a canvas, a media element or Web Audio, so the base hook is all you need. React Native has no such general facility, so the SDK provides its own pipelines, built into `@fishjam-cloud/react-native-webrtc`: custom video tracks fed with frames, and custom audio tracks fed with PCM samples. + +### The video frame pipeline + +```mermaid +flowchart LR + frames["Your frames
(native buffers or
rendered surfaces)"] --> track["Custom video track
(react-native-webrtc)"] + track --> stream["MediaStream"] + stream --> hook["useCustomSource"] + hook --> room["Fishjam room"] + room --> peers["Other peers
customVideoTracks"] +``` + +A **custom video track** looks like any other WebRTC video track to the rest of the stack, but its frames are supplied by your code through one of two modes: + +- **Forwarding**: you already have finished frames as native buffers (`CVPixelBufferRef` on iOS, `AHardwareBuffer*` on Android). `forwardFrame` passes the buffer pointer to the track; the SDK retains the buffer for as long as encoding needs it, so you can release your reference immediately. +- **Render target (pooled)**: you draw the frames yourself. The SDK allocates a small pool of GPU-shareable surfaces (IOSurfaces on iOS, AHardwareBuffers on Android); you import a surface into your GPU once, render into it, and return it with `pushFrame`. A pool of about 3 surfaces keeps drawing and encoding overlapped: one surface can be encoding while the next is being drawn. + +Both paths are zero-copy: pixels stay in the same native memory from your producer to the video encoder, and only a pointer moves. + +The pipeline also handles: + +- **GPU synchronization.** With asynchronous renderers, a pushed surface may not be fully drawn when the encoder reads it. `pushFrame` accepts a _fence_ (an `MTLSharedEvent` on iOS, a sync file descriptor on Android) so the encoder waits for your GPU work. The WebGPU hooks manage this automatically. +- **One timestamp domain.** Encoders require monotonically increasing timestamps. Forwarded frames without timestamps are stamped from the native monotonic clock, and the VisionCamera adapter normalizes VisionCamera's per-platform timestamp units onto one zero-based nanosecond timeline. +- **Worklet-friendly handles.** Track handles are plain, worklet-serializable objects, so frames can be pushed straight from a frame-processor worklet without hopping through the JS thread. This synchronous JSI handoff is also why custom video tracks require the New Architecture. + +### The audio pipeline + +A **custom audio track** takes raw PCM through `pushAudioSamples`, in any chunk size, from the JS thread or a worklet. The [`useCustomAudioSource`](../how-to/client/custom-sources/react-native.mdx#publish-custom-audio) hook wraps the underlying `createCustomAudioTrack` and registers the resulting stream through `useCustomSource`, so audio follows the same source-ID contract and publish lifecycle as every other custom source. + +The native layer re-paces pushes into the continuous real-time frame stream the encoder expects and inserts silence when the buffer runs dry, so the track behaves like a live microphone: pauses in pushing are fine and the stream never ends. Pushed-but-not-yet-sent audio is buffered up to a configurable duration (one minute by default) and drains in real time. Like the video handles, the audio track handle is worklet-serializable and its push channel is a synchronous JSI binding, which is why custom audio tracks also require the New Architecture. + +## Platform foundations + +- **iOS**: video surfaces are IOSurface-backed, BGRA8 (`bgra8unorm` as a render target). The WebGPU camera import relies on Metal external-texture features that are only guaranteed on iOS 17+; publishing frames without WebGPU has no such requirement. +- **Android**: video surfaces are `AHardwareBuffer`s, RGBA8 (`rgba8unorm`). The camera arrives as an opaque YCbCr buffer, so the WebGPU toolkit's `sampleCamera` performs the BT.709 limited-range YUV→RGB conversion in-shader. + +## Where to go next + +- [Custom sources how-to guides](../how-to/client/custom-sources/index.mdx): publish from the web, React Native, Vision Camera, WebGPU, or your own pipeline +- API reference: [`useCustomSource` (Web)](../api/web/functions/useCustomSource), [`useCustomSource` (React Native)](../api/mobile/functions/useCustomSource), [`useCustomAudioSource` (React Native)](../api/mobile/functions/useCustomAudioSource), [Vision Camera Source package](../api/vision-camera-source/index), [Custom Video Source package](../api/custom-video-source/index) diff --git a/versioned_docs/version-0.26.0/explanation/data-channels.mdx b/versioned_docs/version-0.29.0/explanation/data-channels.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/data-channels.mdx rename to versioned_docs/version-0.29.0/explanation/data-channels.mdx diff --git a/versioned_docs/version-0.26.0/explanation/glossary.md b/versioned_docs/version-0.29.0/explanation/glossary.md similarity index 83% rename from versioned_docs/version-0.26.0/explanation/glossary.md rename to versioned_docs/version-0.29.0/explanation/glossary.md index 8a91d981..14584929 100644 --- a/versioned_docs/version-0.26.0/explanation/glossary.md +++ b/versioned_docs/version-0.29.0/explanation/glossary.md @@ -36,4 +36,4 @@ The ID of your Fishjam instance. It is used by your backend server to add peers ### Sandbox API -A simple testing API allowing you to test Fishjam features without requiring you to add any functionalities to your backend. As the name suggests, it's available **only** in the Sandbox environment. You can find more details [here](/how-to/backend/sandbox-api-testing). +A simple testing API allowing you to test Fishjam features without requiring you to add any functionalities to your backend. It is intended for development and testing only, not for production use. You can find more details [here](/how-to/backend/sandbox-api-testing). diff --git a/versioned_docs/version-0.26.0/explanation/livestreams.mdx b/versioned_docs/version-0.29.0/explanation/livestreams.mdx similarity index 90% rename from versioned_docs/version-0.26.0/explanation/livestreams.mdx rename to versioned_docs/version-0.29.0/explanation/livestreams.mdx index d0f7c5d9..bee685b7 100644 --- a/versioned_docs/version-0.26.0/explanation/livestreams.mdx +++ b/versioned_docs/version-0.29.0/explanation/livestreams.mdx @@ -41,15 +41,15 @@ By default, created livestreams are `private`, to prevent possible bugs. ```python - from fishjam import FishjamClient + from fishjam import FishjamClient, RoomOptions fishjam_client = FishjamClient( fishjam_id=fishjam_id, management_token=management_token, - ); + ) - private_room = fishjam_client.create_room(room_type="livestream") # [!code highlight] - public_room = fishjam_client.create_room(room_type="livestream", public=True) # [!code highlight] + private_room = fishjam_client.create_room(RoomOptions(room_type="livestream")) # [!code highlight] + public_room = fishjam_client.create_room(RoomOptions(room_type="livestream", public=True)) # [!code highlight] ``` @@ -93,14 +93,14 @@ Note that for development purposes, you can [use the Sandbox API to generate a v ```python - from fishjam import FishjamClient + from fishjam import FishjamClient, RoomOptions fishjam_client = FishjamClient( fishjam_id=fishjam_id, management_token=management_token, - ); + ) - private_room = fishjam_client.create_room(room_type="livestream") + private_room = fishjam_client.create_room(RoomOptions(room_type="livestream")) viewer_token = fishjam_client.create_livestream_viewer_token(private_room.id) # [!code highlight] ``` @@ -150,7 +150,9 @@ Once you've created a viewer token, you can connect to a room using the Fishjam await connect({ token: viewerToken }); // Render the stream - {stream && } + {stream && ( + + )} ``` @@ -210,7 +212,9 @@ Once you've created a room of type `livestream` with the `public` flag enabled, await connect({ streamId: roomId }); // Render the stream - {stream && } + {stream && ( + + )} ``` diff --git a/versioned_docs/version-0.29.0/explanation/moq-with-fishjam.mdx b/versioned_docs/version-0.29.0/explanation/moq-with-fishjam.mdx new file mode 100644 index 00000000..41b6c3a5 --- /dev/null +++ b/versioned_docs/version-0.29.0/explanation/moq-with-fishjam.mdx @@ -0,0 +1,154 @@ +--- +type: explanation +sidebar_position: 9 +title: Media over QUIC in Fishjam +description: Understand how Media over QUIC (MoQ) works in Fishjam — the relay model, publish/subscribe architecture, paths, and token-based access control. +--- + +# Media over QUIC in Fishjam + +_How Media over QUIC (MoQ) works in Fishjam_ + +:::warning[MoQ is a standalone feature] +MoQ runs as a **separate delivery path** in Fishjam — it handles publishing and subscribing to a live broadcast over the MoQ relay, and the rest of Fishjam's feature set does not apply to a MoQ stream. In particular, a MoQ broadcast is not part of a WebRTC [room](./rooms), so you cannot use features like [Agents](../tutorials/agents), [data channels](./data-channels), and others that are part of the Fishjam WebRTC ecosystem. + +What MoQ supports is covered end to end in the [MoQ tutorials](../tutorials/moq/web-publishing). +::: + +## What is MoQ? + +[Media over QUIC (MoQ)](https://datatracker.ietf.org/wg/moq/about/) is a new internet standard for live media delivery, designed from the ground up for **scalable, low-latency streaming to large audiences**. + +Unlike WebRTC — which was primarily built for interactive, peer-to-peer conferencing — MoQ is optimized for the one-to-many broadcast model: one publisher, potentially thousands of simultaneous subscribers, all receiving the stream with minimal delay. + +A few properties make MoQ stand out: + +- **Built on QUIC.** QUIC is a modern transport protocol that eliminates head-of-line blocking, recovers from packet loss more gracefully than TCP, and establishes connections faster. For live video, this means more resilient delivery at low latency. +- **Standardized negotiation.** Because MoQ defines a common signaling and subscription protocol, any MoQ-compliant client can connect to any MoQ-compliant relay — you are not locked into a proprietary stack. +- **Relay-based architecture.** The relay is a first-class part of the MoQ protocol, not an add-on. Because relaying is built into the protocol's design, scaling delivery to large audiences is a native capability. + +:::info +Fishjam also supports WebRTC-based livestreaming (WHIP/WHEP). See [Livestreams](./livestreams) for that approach. +::: + +## How MoQ Works in Fishjam + +Fishjam provides a **MoQ relay** that publishers push media to and subscribers pull media from. + +``` +Publisher → Fishjam MoQ Relay → Subscriber(s) +``` + +The relay is responsible for distributing the stream: it receives media from the publisher once and fans it out to every subscriber. + +### The publish/subscribe model + +MoQ uses a **publish/subscribe** model: + +- A **publisher** connects to the relay, announces a stream under a specific path, and starts sending media. +- **Subscribers** connect to the relay, discover announced paths, and receive the media. + +The relay manages the flow between them. Neither side needs a direct connection to the other. + +### Paths + +Every stream is identified by a **path** — a slash-separated string like `my-room/alice-camera`. Paths are used in two distinct ways: + +1. **Addressing** — a subscriber consumes an exact path to receive that specific stream (e.g. `my-room/alice-camera`). +2. **Discovery** — a subscriber watches a prefix (e.g. `my-room`) to learn which streams are currently live under it. This returns a live feed of announced paths — each of which must then be consumed individually. This is how you can display all participants in a room without knowing their paths in advance. + +Note that consuming an exact path and discovering a prefix are separate operations. Consuming `my-room` directly would fail unless a publisher is broadcasting at that exact path. + +### Path Scoping + +Every connection goes to `relay.fishjam.io/`. Your Fishjam ID is automatically used as the token's root namespace by the Fishjam Server — you never include it in `publishPath` or `subscribePath`; it is set for you. All paths you specify are **relative to that root**. + +Path matching is **prefix-based**: a path of `"stream-name"` permits any broadcast whose full path starts with `stream-name/`, not just the exact string `"stream-name"`. + +#### Publisher paths + +The `publishPath` you set determines how much freedom the broadcaster has when naming their broadcast: + +- **Broad path** (`publishPath: "stream-name"`) — the client can publish as any sub-path under `stream-name`, such as `stream-name/alice` or `stream-name/bob-camera`. The client chooses its own identity; the relay only enforces the prefix. +- **Specific path** (`publishPath: "stream-name/alice"`) — the client can **only** publish as `stream-name/alice`. If the broadcaster tries to use `stream-name/bob`, the relay rejects the announcement. This is how you enforce a broadcaster's identity from the server side. + +Use the broad form when clients self-identify (e.g., users pick their own stream name). Use the specific form when your backend assigns identities (e.g., you issue a per-user token for a managed conference). + +#### Subscriber paths + +The `subscribePath` works the same way: it is a prefix that limits which broadcasts the subscriber can consume and discover. + +- **Broad path** (`subscribePath: "stream-name"`) — the subscriber can consume any broadcast under `stream-name/` and will surface all publishers in that namespace as they come and go. +- **Specific path** (`subscribePath: "stream-name/alice"`) — the subscriber can only receive from `stream-name/alice`. Broadcasts at `stream-name/bob` are invisible to this client. + +#### Example: a multi-publisher room + +A typical room setup uses a combination of both patterns: + +1. The backend issues each broadcaster a **specific** publisher token — `publishPath: "my-room/"` — so each user can only occupy their own slot. +2. The backend issues viewers a **broad** subscriber token — `subscribePath: "my-room"` — so they discover and consume every broadcast in the room. +3. When a new publisher joins or leaves, the viewer is informed by the relay + +## Access Control: MoQ Tokens + +Access to the relay is controlled by **MoQ tokens** — short-lived JWTs that are path-scoped: + +| Token type | Grants | Typical recipient | +| ---------------- | ---------------------------------- | ----------------- | +| Publisher token | Write access to a specific path | Streamer | +| Subscriber token | Read access to a path or namespace | Viewer | + +A token is attached to the relay URL as a query parameter (`?jwt=`). The relay validates the token and enforces its scope before allowing any media to flow. Both the Sandbox API and the Server SDK hand you the authenticated **connection URL** (the relay URL with the token already embedded), so the client can just take it as is and connect. + +Keeping publisher and subscriber tokens separate ensures that a viewer can never accidentally publish to the stream, and a publisher cannot subscribe to paths it does not own. + +## Where to get the Connection URL from? + +There are two ways to obtain a MoQ connection URL, depending on where you are in the development lifecycle. + +### Sandbox API (prototyping) + +The **Sandbox API** is a ready-made backend provided by Fishjam for development and prototyping. It issues connection URLs without requiring you to build your own server, so you can start streaming immediately. + +To get a publisher connection URL, call: + +``` +GET https://fishjam.io/api/v1/connect/{FISHJAM_ID}/room-manager/moq/{PUBLISHER-PATH}/publisher +``` + +To get a subscriber connection URL, call: + +``` +GET https://fishjam.io/api/v1/connect/{FISHJAM_ID}/room-manager/moq/{SUBSCRIBER-PATH}/subscriber +``` + +To get a full-access connection URL — one that can both publish to and subscribe on the path — call: + +``` +GET https://fishjam.io/api/v1/connect/{FISHJAM_ID}/room-manager/moq/{PATH}/full-access +``` + +Each returns a JSON object with a `connection_url` field — the relay URL with the JWT embedded as `?jwt=` — alongside the raw `token`. + +The Sandbox API is **not intended for production** — it has no authentication and is only available in the Sandbox environment. See [What is the Sandbox API?](./sandbox-api-concept) for more context. + +### Fishjam Server SDK (production) + +In production, your backend generates connection URLs using the **Fishjam Server SDK**. This gives you full control over who can publish and who can subscribe. + +The SDK's `createMoqAccess` method accepts a `publishPath`, a `subscribePath`, or both, and returns the MoQ access details — a `connection_url` (the relay URL with the JWT embedded) alongside the raw `token`: + +- `publishPath` — returns a publisher connection URL scoped to that path. +- `subscribePath` — returns a subscriber connection URL scoped to that path or namespace prefix. +- both `publishPath` and `subscribePath` — returns a full-access connection URL that can publish and subscribe on those paths. + +Your backend then delivers each connection URL to the appropriate client (publisher or viewer), which uses it to connect to the relay. + +See the [Web Publishing](../tutorials/moq/web-publishing) and [Web Subscribing](../tutorials/moq/web-subscribing) tutorials (or their [React Native](../tutorials/moq/react-native-publishing) [counterparts](../tutorials/moq/react-native-subscribing)) for working code examples. + +## See also + +- [Web Publishing](../tutorials/moq/web-publishing) / [Web Subscribing](../tutorials/moq/web-subscribing) — step-by-step guides to publishing and subscribing +- [What is the Sandbox API?](./sandbox-api-concept) — when and why to use the Sandbox API +- [Security & Token Model](./security-tokens) — broader overview of Fishjam's token system +- [Livestreams](./livestreams) — WebRTC-based livestreaming with WHIP/WHEP diff --git a/versioned_docs/version-0.26.0/explanation/rooms.mdx b/versioned_docs/version-0.29.0/explanation/rooms.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/rooms.mdx rename to versioned_docs/version-0.29.0/explanation/rooms.mdx diff --git a/versioned_docs/version-0.26.0/explanation/sandbox-api-concept.mdx b/versioned_docs/version-0.29.0/explanation/sandbox-api-concept.mdx similarity index 61% rename from versioned_docs/version-0.26.0/explanation/sandbox-api-concept.mdx rename to versioned_docs/version-0.29.0/explanation/sandbox-api-concept.mdx index bd15f1b2..24a555aa 100644 --- a/versioned_docs/version-0.26.0/explanation/sandbox-api-concept.mdx +++ b/versioned_docs/version-0.29.0/explanation/sandbox-api-concept.mdx @@ -10,14 +10,27 @@ The Sandbox API is a development tool that simplifies getting started with Fishj ## What can the Sandbox API do? -The Sandbox API is an HTTP server that comes with Fishjam's Sandbox environment. +The Sandbox API is an HTTP server provided by us for development and testing. It provides basic room creation and peer management functionality without requiring you to set up your own backend infrastructure. ### Key Characteristics - **Development-purposed**: Designed for initial development and testing - **No authentication**: Simplified access for quick prototyping -- **Sandbox-only**: Only available in the Sandbox environment +- **Testing-only**: Not intended for production use; use your own authenticated backend for production + +## Sandbox API URL and Fishjam ID + +You can find your sandbox credentials in the [Sandbox tab](https://fishjam.io/app/sandbox) of the Fishjam Dashboard. + +The **Sandbox API** is a hosted HTTP backend you can use to test Fishjam without writing your own server. It creates [**rooms**](../explanation/rooms) and **peers** for conferencing, and supports [**livestreaming**](../explanation/livestreams) by issuing the streamer and viewer credentials. It's an example implementation of what you need to build using our [**JavaScript server SDK**](../api/server) to go to production. + +You can use your sandbox credentials by passing them to the `useSandbox` hook in the client SDK, which will create rooms and peer tokens for you, or by calling the Sandbox API URL directly from your client and using the returned `peerToken` to connect to Fishjam. + +The **Fishjam ID** from the [Dashboard tab](https://fishjam.io/app) is passed to `FishjamProvider` so the client can connect to the Fishjam media server after it gets a peer token. + +If your Sandbox API URL is exposed or your credentials are compromised, generate a new URL from the Sandbox tab to invalidate the old one. You can also disable the Sandbox API and enable it again when you want to resume sandbox testing. +If you expose your Sandbox API URL in a public deployment, it can leak (for example through client code or network requests). Anyone who obtains that URL can create rooms and peers on your behalf. ## The Problem Sandbox API Solves diff --git a/versioned_docs/version-0.26.0/explanation/security-tokens.mdx b/versioned_docs/version-0.29.0/explanation/security-tokens.mdx similarity index 97% rename from versioned_docs/version-0.26.0/explanation/security-tokens.mdx rename to versioned_docs/version-0.29.0/explanation/security-tokens.mdx index e0b249bc..e0e86a54 100644 --- a/versioned_docs/version-0.26.0/explanation/security-tokens.mdx +++ b/versioned_docs/version-0.29.0/explanation/security-tokens.mdx @@ -29,7 +29,6 @@ Management tokens provide your backend server with administrative access to Fish - **Long-lived**: Management tokens remain valid until manually regenerated - **High privilege**: Management tokens allow performing administrative operations and should only be used in backend applications. - **Backend-only**: Management tokens should never be sent to client applications. -- **Environment-specific**: There are different tokens for sandbox and production. ### What Management Tokens Can Do diff --git a/versioned_docs/version-0.26.0/explanation/simulcast.mdx b/versioned_docs/version-0.29.0/explanation/simulcast.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/simulcast.mdx rename to versioned_docs/version-0.29.0/explanation/simulcast.mdx diff --git a/versioned_docs/version-0.26.0/explanation/what-is-fishjam.mdx b/versioned_docs/version-0.29.0/explanation/what-is-fishjam.mdx similarity index 100% rename from versioned_docs/version-0.26.0/explanation/what-is-fishjam.mdx rename to versioned_docs/version-0.29.0/explanation/what-is-fishjam.mdx diff --git a/versioned_docs/version-0.26.0/how-to/_category_.json b/versioned_docs/version-0.29.0/how-to/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/how-to/_category_.json rename to versioned_docs/version-0.29.0/how-to/_category_.json diff --git a/versioned_docs/version-0.26.0/how-to/_common/metadata/header.mdx b/versioned_docs/version-0.29.0/how-to/_common/metadata/header.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/_common/metadata/header.mdx rename to versioned_docs/version-0.29.0/how-to/_common/metadata/header.mdx diff --git a/versioned_docs/version-0.26.0/how-to/_common/metadata/joining_room.mdx b/versioned_docs/version-0.29.0/how-to/_common/metadata/joining_room.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/_common/metadata/joining_room.mdx rename to versioned_docs/version-0.29.0/how-to/_common/metadata/joining_room.mdx diff --git a/versioned_docs/version-0.26.0/how-to/_common/metadata/reading.mdx b/versioned_docs/version-0.29.0/how-to/_common/metadata/reading.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/_common/metadata/reading.mdx rename to versioned_docs/version-0.29.0/how-to/_common/metadata/reading.mdx diff --git a/versioned_docs/version-0.26.0/how-to/_common/metadata/updating.mdx b/versioned_docs/version-0.29.0/how-to/_common/metadata/updating.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/_common/metadata/updating.mdx rename to versioned_docs/version-0.29.0/how-to/_common/metadata/updating.mdx diff --git a/versioned_docs/version-0.26.0/how-to/backend/_category_.json b/versioned_docs/version-0.29.0/how-to/backend/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/how-to/backend/_category_.json rename to versioned_docs/version-0.29.0/how-to/backend/_category_.json diff --git a/versioned_docs/version-0.26.0/how-to/backend/audio-only-calls.mdx b/versioned_docs/version-0.29.0/how-to/backend/audio-only-calls.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/backend/audio-only-calls.mdx rename to versioned_docs/version-0.29.0/how-to/backend/audio-only-calls.mdx diff --git a/versioned_docs/version-0.26.0/how-to/backend/fastapi-example.mdx b/versioned_docs/version-0.29.0/how-to/backend/fastapi-example.mdx similarity index 62% rename from versioned_docs/version-0.26.0/how-to/backend/fastapi-example.mdx rename to versioned_docs/version-0.29.0/how-to/backend/fastapi-example.mdx index dd886255..0163749b 100644 --- a/versioned_docs/version-0.26.0/how-to/backend/fastapi-example.mdx +++ b/versioned_docs/version-0.29.0/how-to/backend/fastapi-example.mdx @@ -38,35 +38,39 @@ async def get_rooms(fishjam_client: Annotated[FishjamClient, Depends(fishjam_cli ## Listening to events -Fishjam instance is a stateful server that is emitting messages upon certain events. -You can listen for those messages and react as you prefer. -There are two options for obtaining these. +Fishjam emits messages upon certain events — see [Listening to events](../../how-to/backend/server-setup#listening-to-events) for how delivery, batching, and signing work. ### Webhooks -To receive and parse Fishjam protobuf messages, create a dependable function that parses the request body using the `receive_binary` function from the `fishjam` package. -Then, you will be able to use pattern matching to respond to different kinds of events. +Create a dependency function that [verifies the webhook signature](../../how-to/backend/server-setup#verifying-webhook-signatures) and decodes the request body into notifications, then use pattern matching to respond to different kinds of events. + +:::note +`decode_server_notifications` replaces the now-deprecated `receive_binary`. +::: ```python +import os from fastapi import Depends, FastAPI, HTTPException, Request -from fishjam import receive_binary +from fishjam import decode_server_notifications, verify_webhook_signature from fishjam.events import ServerMessagePeerAdded app = FastAPI() -async def parse_fishjam_message(request: Request): +async def parse_fishjam_notifications(request: Request): binary = await request.body() - if message := receive_binary(binary): - return message - raise HTTPException(status_code=400, detail="Invalid Fishjam message") + signature = request.headers.get("x-fishjam-signature-256", "") + if not verify_webhook_signature(binary, signature, os.environ["FISHJAM_WEBHOOK_SECRET"]): + raise HTTPException(status_code=401, detail="Invalid webhook signature") + return decode_server_notifications(binary) @app.post("/fishjam-webhook") -async def fishjam_webhook(fishjam_message = Depends(parse_fishjam_message)): - match fishjam_message: - case ServerMessagePeerAdded(): - print(f"Peer added: {fishjam_message.peer_id}") - case _: - ... +async def fishjam_webhook(notifications = Depends(parse_fishjam_notifications)): + for notification in notifications: + match notification: + case ServerMessagePeerAdded(): + print(f"Peer added: {notification.peer_id}") + case _: + ... ``` ### SDK Notifier @@ -77,8 +81,9 @@ It doesn't interact with the FastAPI library per se, just start the event loop a ```python import asyncio from fishjam import FishjamNotifier +from fishjam.events import ServerMessagePeerAdded -notifier = FishjamNotifier(server_address=fishjam_id, server_api_token=management_token) +notifier = FishjamNotifier(fishjam_id=fishjam_id, management_token=management_token) @notifier.on_server_notification def handle_notification(notification): diff --git a/versioned_docs/version-0.26.0/how-to/backend/fastify-example.mdx b/versioned_docs/version-0.29.0/how-to/backend/fastify-example.mdx similarity index 83% rename from versioned_docs/version-0.26.0/how-to/backend/fastify-example.mdx rename to versioned_docs/version-0.29.0/how-to/backend/fastify-example.mdx index 5a2dc44a..15fe9fb8 100644 --- a/versioned_docs/version-0.26.0/how-to/backend/fastify-example.mdx +++ b/versioned_docs/version-0.29.0/how-to/backend/fastify-example.mdx @@ -111,31 +111,49 @@ fastify.listen({ port: 3000 }); ## Listening to events -Fishjam instance is a stateful server that is emitting messages upon certain events. -You can listen for those messages and react as you prefer. -There are two options to obtain these. +Fishjam emits messages upon certain events — see [Listening to events](../../how-to/backend/server-setup#listening-to-events) for how delivery, batching, and signing work. ### Webhooks -To receive and parse the Fishjam protobuf messages, add a content type parser to your global (or scoped) Fastify instance. -Then, you will be able to access the parsed message at `request.Body`. +Add a content type parser to your global (or scoped) Fastify instance that [verifies the webhook signature](../../how-to/backend/server-setup#verifying-webhook-signatures) and decodes the body into typed notifications. +You can then iterate over the parsed notifications at `request.body`. ```ts title='main.ts' import Fastify, { FastifyRequest } from "fastify"; -import { ServerMessage } from "@fishjam-cloud/js-server-sdk"; +import { + decodeServerNotifications, + verifyWebhookSignature, + ServerNotification, +} from "@fishjam-cloud/js-server-sdk"; const fastify = Fastify(); fastify.addContentTypeParser( "application/x-protobuf", { parseAs: "buffer" }, - async (_: FastifyRequest, body: Buffer) => - ServerMessage.decode(new Uint8Array(body)), + async (request: FastifyRequest, body: Buffer) => { + const signature = request.headers["x-fishjam-signature-256"]; + if ( + typeof signature !== "string" || + !verifyWebhookSignature( + body, + signature, + process.env.FISHJAM_WEBHOOK_SECRET!, + ) + ) { + throw Object.assign(new Error("Invalid webhook signature"), { + statusCode: 401, + }); + } + return decodeServerNotifications(body); + }, ); -fastify.post<{ Body: ServerMessage }>("/fishjam-webhook", (request) => { - // handle the message - console.log(request.body); +fastify.post<{ Body: ServerNotification[] }>("/fishjam-webhook", (request) => { + // handle each notification + for (const { type, notification } of request.body) { + console.log(type, notification); + } }); ``` diff --git a/versioned_docs/version-0.29.0/how-to/backend/production-deployment.mdx b/versioned_docs/version-0.29.0/how-to/backend/production-deployment.mdx new file mode 100644 index 00000000..5d8f5ca7 --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/backend/production-deployment.mdx @@ -0,0 +1,417 @@ +--- +type: how-to +description: Deploy your Fishjam backend safely to production, moving from sandbox to a production-ready setup. +--- + +import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; + +# How to Deploy Fishjam to Production + +**How-to Guide** - _Deploy your Fishjam backend safely to production_ + +This guide covers the essential steps to move from development (using the Sandbox API) to a production-ready Fishjam backend deployment. + +## Prerequisites + +- Working Fishjam backend (see [Backend Quick Start](../../tutorials/backend-quick-start)) +- A Fishjam account on the **Standard Jar** plan (recommended for production deployments) +- Domain and SSL certificates for your backend +- Production database and infrastructure + +## Step 1: Get your Fishjam credentials + +### Get credentials from the dashboard + +1. Log in to [Fishjam Dashboard](https://fishjam.io/app) +2. Copy your **Fishjam ID** and **Management Token** from the dashboard + +### Environment variables setup + +Create your environment variables: + +```bash +# Fishjam credentials +FISHJAM_ID="your-fishjam-id" +FISHJAM_MANAGEMENT_TOKEN="your-management-token" + +# Your application settings +NODE_ENV="production" +PORT="3000" +DATABASE_URL="your-production-database-url" + +# Security settings +JWT_SECRET="your-secure-jwt-secret" +CORS_ORIGIN="https://yourdomain.com" +``` + +## Step 2: Replace Sandbox API with proper authentication + +### Replace Sandbox API calls + +Remove any Sandbox API dependencies from your client code: + +```typescript +// @noErrors: 2451 +import { useSandbox } from "@fishjam-cloud/react-client"; +import express from "express"; + +const authenticateUser = {} as any; +const app = express(); + +const sandboxApiUrl = "your-sandbox-api-url-here"; +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl }); + +const userToken = ""; +const roomName = ""; +const userName = ""; + +// ---cut--- +// ❌ Remove: Sandbox API calls +const peerToken = await getSandboxPeerToken(roomName, userName); + +// ✅ Replace with: Your authenticated API +const response = await fetch("https://your-backend.com/api/join-room", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${userToken}`, + }, + body: JSON.stringify({ roomName, userName }), +}); +``` + +### Implement user authentication + +Wire up the Fishjam client and your own authentication. The middleware below verifies the caller and attaches the user, so the next handler can mint a peer token for them. + + + + + ```typescript + // @noErrors: 2339 + const jwt = {} as any; + import { FishjamClient } from "@fishjam-cloud/js-server-sdk"; + import express from "express"; + + process.env.FISHJAM_ID = ""; + process.env.FISHJAM_MANAGEMENT_TOKEN = ""; + process.env.JWT_SECRET = ""; + + // ---cut--- + const fishjamClient = new FishjamClient({ + fishjamId: process.env.FISHJAM_ID!, + managementToken: process.env.FISHJAM_MANAGEMENT_TOKEN!, + }); + + const app = express(); + app.use(express.json()); // parse JSON request bodies + + // Your own auth (JWT, session, ...) + const authenticateUser = async ( + req: express.Request, + res: express.Response, + next: express.NextFunction, + ) => { + const token = req.headers.authorization?.replace("Bearer ", ""); + if (!token) return res.status(401).json({ error: "Unauthorized" }); + + req.user = jwt.verify(token, process.env.JWT_SECRET); + next(); + }; + ``` + + + + + + ```python + import os + import jwt + from fastapi import Body, Depends, FastAPI, Header, HTTPException + from fishjam import FishjamClient, PeerOptions + + app = FastAPI() + + fishjam_client = FishjamClient( + fishjam_id=os.environ["FISHJAM_ID"], + management_token=os.environ["FISHJAM_MANAGEMENT_TOKEN"], + ) + + # Your own auth (JWT, session, ...) + async def authenticate_user(authorization: str = Header()): + token = authorization.removeprefix("Bearer ") + try: + return jwt.decode(token, os.environ["JWT_SECRET"], algorithms=["HS256"]) + except jwt.InvalidTokenError: + raise HTTPException(status_code=401, detail="Unauthorized") + ``` + + + + +### Create a room and add a peer + +Now expose the endpoint your client calls to join the room. Fishjam rooms are identified by an `id`, so keep a mapping from your own room name to the Fishjam room id and create the room lazily on first join. Then add a peer tagged with the authenticated user and return its peer token. + + + + + ```typescript + // @noErrors: 2339 + import { FishjamClient, RoomId } from "@fishjam-cloud/js-server-sdk"; + import express from "express"; + + const app = express(); + declare const fishjamClient: FishjamClient; + declare const authenticateUser: express.RequestHandler; + + // ---cut--- + // Map your room name to a Fishjam room id (use your database in production) + const roomIds = new Map(); + + const getOrCreateRoom = async (roomName: string): Promise => { + const existing = roomIds.get(roomName); + if (existing) return existing; + + const room = await fishjamClient.createRoom(); + roomIds.set(roomName, room.id); + return room.id; + }; + + // Mint a Fishjam peer token for the authenticated user + app.post("/api/join-room", authenticateUser, async (req, res) => { + const { roomName } = req.body; + const roomId = await getOrCreateRoom(roomName); + + const { peerToken } = await fishjamClient.createPeer(roomId, { + metadata: { userId: req.user.userId }, + }); + res.json({ peerToken }); + }); + ``` + + + + + + ```python + # Map your room name to a Fishjam room id (use your database in production) + room_ids: dict[str, str] = {} + + def get_or_create_room(room_name: str) -> str: + room_id = room_ids.get(room_name) + if room_id is not None: + return room_id + room = fishjam_client.create_room() + room_ids[room_name] = room.id + return room.id + + # Mint a Fishjam peer token for the authenticated user + @app.post("/api/join-room") + async def join_room(room_name: str = Body(embed=True), user=Depends(authenticate_user)): + room_id = get_or_create_room(room_name) + options = PeerOptions(metadata={"userId": user["userId"]}) + _, peer_token = fishjam_client.create_peer(room_id, options) + return {"peerToken": peer_token} + ``` + + + + +## (Optional) Step 3: Handle webhooks and events + +You may wish to receive events from Fishjam regarding created rooms and peers. +All you need for this is a single api endpoint: + +### Webhook endpoint + +Fishjam delivers notifications as a binary `application/x-protobuf` body. Read the raw body, [verify the webhook signature](../../how-to/backend/server-setup#verifying-webhook-signatures), and decode it with the SDK, then react to the events you care about. Store your webhook secret as `FISHJAM_WEBHOOK_SECRET`. + + + + + ```typescript + import express from "express"; + import { + decodeServerNotifications, + verifyWebhookSignature, + } from "@fishjam-cloud/js-server-sdk"; + + const app = express(); + const handlePeerConnected = {} as any; + const handlePeerDisconnected = {} as any; + const handleRoomDeleted = {} as any; + + // ---cut--- + app.post( + "/api/webhooks/fishjam", + express.raw({ type: "application/x-protobuf" }), + (req: express.Request, res: express.Response) => { + const signature = req.headers["x-fishjam-signature-256"]; + if ( + typeof signature !== "string" || + !verifyWebhookSignature( + req.body, + signature, + process.env.FISHJAM_WEBHOOK_SECRET!, + ) + ) { + return res.status(401).json({ error: "Invalid signature" }); + } + + for (const { type, notification } of decodeServerNotifications(req.body)) { + switch (type) { + case "peerConnected": + handlePeerConnected(notification); + break; + case "peerDisconnected": + handlePeerDisconnected(notification); + break; + case "roomDeleted": + handleRoomDeleted(notification); + break; + default: + break; + } + } + + res.status(200).json({ received: true }); + }, + ); + ``` + + + + + + ```python + import os + from fastapi import FastAPI, HTTPException, Request + from fishjam import decode_server_notifications, verify_webhook_signature + from fishjam.events import ( + ServerMessagePeerConnected, + ServerMessagePeerDisconnected, + ServerMessageRoomDeleted, + ) + + app = FastAPI() + + @app.post("/api/webhooks/fishjam") + async def fishjam_webhook(request: Request): + raw_body = await request.body() + signature = request.headers.get("x-fishjam-signature-256", "") + if not verify_webhook_signature(raw_body, signature, os.environ["FISHJAM_WEBHOOK_SECRET"]): + raise HTTPException(status_code=401, detail="Invalid signature") + + for notification in decode_server_notifications(raw_body): + match notification: + case ServerMessagePeerConnected(): + handle_peer_connected(notification) + case ServerMessagePeerDisconnected(): + handle_peer_disconnected(notification) + case ServerMessageRoomDeleted(): + handle_room_deleted(notification) + case _: + ... + return {"received": True} + ``` + + + + +### Enabling webhooks + +Now, with your endpoint set up, register its URL in the **Webhooks** tab of the [Fishjam Dashboard](https://fishjam.io/app). Fishjam then delivers all notifications to that endpoint. We also recommend enabling [notification batching](../../how-to/backend/server-setup#webhooks) when creating rooms: + + + + + ```typescript + import { FishjamClient } from "@fishjam-cloud/js-server-sdk"; + const fishjamClient = {} as any; + + // ---cut--- + const createBatchedRoom = async (roomType = "conference") => { + const room = await fishjamClient.createRoom({ + roomType, + // Coalesce notifications into batches for faster delivery and fewer requests + batchWebhookNotifications: true, + }); + + return room; + }; + ``` + + + + + + ```python + import os + from fishjam import FishjamClient, RoomOptions + + fishjam_client = FishjamClient( + fishjam_id=os.environ["FISHJAM_ID"], + management_token=os.environ["FISHJAM_MANAGEMENT_TOKEN"], + ) + + def create_batched_room(room_type="conference"): + options = RoomOptions( + room_type=room_type, + # Coalesce notifications into batches for faster delivery and fewer requests + batch_webhook_notifications=True, + ) + return fishjam_client.create_room(options) + ``` + + + + +## Common production issues + +### Issue: Token expiration handling + +Peer tokens expire 24h after creation. +We encourage keeping room and peer lifetimes as short as possible +(typically a single room corresponds to a single video call or stream). +However, if you wish to reuse a single peer over multiple days, you can make use of token refreshing: + + + + + ```ts + import { FishjamClient, RoomId, PeerId } from "@fishjam-cloud/js-server-sdk"; + const fishjamClient = new FishjamClient({ + fishjamId: "", + managementToken: "", + }); + const roomId = "" as RoomId; + const peerId = "" as PeerId; + + // ---cut--- + const newToken = fishjamClient.refreshPeerToken(roomId, peerId); + ``` + + + + + + ```python + new_token = fishjam_client.refresh_peer_token(room_id, peer_id) + ``` + + + + +## See also + +For scaling considerations: + +- [Understanding Fishjam Architecture](../../explanation/architecture) +- [Security best practices](../../explanation/security-tokens) + +For specific backend frameworks: + +- [FastAPI example](../../how-to/backend/fastapi-example) +- [Fastify example](../../how-to/backend/fastify-example) diff --git a/versioned_docs/version-0.26.0/how-to/backend/sandbox-api-testing.mdx b/versioned_docs/version-0.29.0/how-to/backend/sandbox-api-testing.mdx similarity index 72% rename from versioned_docs/version-0.26.0/how-to/backend/sandbox-api-testing.mdx rename to versioned_docs/version-0.29.0/how-to/backend/sandbox-api-testing.mdx index 7fc7cda5..69101006 100644 --- a/versioned_docs/version-0.26.0/how-to/backend/sandbox-api-testing.mdx +++ b/versioned_docs/version-0.29.0/how-to/backend/sandbox-api-testing.mdx @@ -3,8 +3,8 @@ sidebar_position: 5 description: Use the Sandbox API to create rooms and peers for testing without setting up your own backend server. --- -import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; # Testing with the Sandbox API @@ -13,16 +13,20 @@ The Sandbox API is a development tool that lets you create rooms and peers for t ## Prerequisites - Access to [Fishjam Dashboard](https://fishjam.io/app) -- A Sandbox environment set up -## Step 1: Get your Fishjam ID +## Step 1: Get your Fishjam ID and Sandbox API URL 1. Log in to [Fishjam Dashboard](https://fishjam.io/app) -2. Navigate to your [Sandbox Environment](https://fishjam.io/app/sandbox) +2. Navigate to the [Sandbox tab](https://fishjam.io/app/sandbox) 3. Copy your **Fishjam ID** +4. In the **Sandbox API** section, copy your **Sandbox API URL** :::note -`FISHJAM_ID` is your unique sandbox identifier. Anyone who knows this ID can join your rooms, so keep it secure during development. +You need both values for React/React Native apps: + +- `Sandbox API url` is used to call the Sandbox API to create test rooms and return peer tokens. +- `Fishjam ID` is passed to `FishjamProvider` so the client can connect to the Fishjam media server after it gets a peer token. + ::: ## Step 2: Create a room and get peer tokens @@ -41,8 +45,8 @@ The Sandbox API is a development tool that lets you create rooms and peers for t // ... - // fishjamId is provided through FishjamProvider - const { getSandboxPeerToken } = useSandbox(); + const SANDBOX_API_URL = "your-sandbox-api-url-here"; + const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const peerToken = await getSandboxPeerToken(roomName, peerName); ``` @@ -51,7 +55,6 @@ The Sandbox API is a development tool that lets you create rooms and peers for t ```ts - const FISHJAM_ID = "..."; const roomName = "testRoom"; const peerName = "testUser"; // ---cut--- @@ -59,7 +62,8 @@ The Sandbox API is a development tool that lets you create rooms and peers for t // ... - const { getSandboxPeerToken } = useSandbox(); + const SANDBOX_API_URL = "your-sandbox-api-url-here"; + const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const peerToken = await getSandboxPeerToken(roomName, peerName); ``` @@ -78,7 +82,7 @@ The Sandbox API is a development tool that lets you create rooms and peers for t ### Room types available - `conference` - For video/audio conferencing (default) -- `audio-only` - For audio-only conferencing +- `audio_only` - For audio-only conferencing - `livestream` - For one-to-many video/audio streaming ## Step 3: Handle the response @@ -88,7 +92,6 @@ The Sandbox API returns a JSON response with connection details: ```json { "peerToken": "", - "url": "wss://fishjam.io/api/v1/connect/${YOUR_APP_UUID}", "room": { "id": "", "name": "foo" @@ -114,6 +117,7 @@ Below are examples on how to use tokens from the Sandbox API in your frontend ap const roomName = "testRoom"; const peerName = `user_${Date.now()}`; const FISHJAM_ID = "..."; + const SANDBOX_API_URL = "..."; const RoomView = (props: {peerToken: string}) => null; // ---cut--- @@ -122,7 +126,7 @@ Below are examples on how to use tokens from the Sandbox API in your frontend ap export default function TestScreen() { const [peerToken, setPeerToken] = useState(null); // fishjamId is provided through FishjamProvider - const { getSandboxPeerToken } = useSandbox(); + const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); useEffect(() => { const fetchPeerToken = async () => { @@ -154,13 +158,14 @@ Below are examples on how to use tokens from the Sandbox API in your frontend ap ```tsx import React, { useState, useEffect } from "react"; - const FISHJAM_ID = "your-app-uuid-here"; + const FISHJAM_ID = "your-fishjam-id-here"; + const SANDBOX_API_URL = "your-sandbox-api-url-here"; // ---cut--- import { FishjamProvider, useConnection, useSandbox } from "@fishjam-cloud/react-client"; function VideoCallComponent() { const { joinRoom, peerStatus } = useConnection(); - const { getSandboxPeerToken } = useSandbox(); + const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const handleJoinRoom = async () => { const roomName = "testRoom"; @@ -201,9 +206,10 @@ Below are examples on how to use tokens from the Sandbox API in your frontend ap ```ts import { useSandbox } from "@fishjam-cloud/react-client"; -const { getSandboxPeerToken } = useSandbox(); +const SANDBOX_API_URL = "your-sandbox-api-url-here"; +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); // ---cut--- -const audioOnlyUrl = await getSandboxPeerToken( +const audioOnlyPeerToken = await getSandboxPeerToken( "audioTest", "user1", "audio_only", @@ -214,15 +220,18 @@ const audioOnlyUrl = await getSandboxPeerToken( ```ts import { useSandbox } from "@fishjam-cloud/react-client"; -const { getSandboxLivestream, getSandboxViewerToken } = useSandbox(); +const SANDBOX_API_URL = "your-sandbox-api-url-here"; +const { getSandboxLivestream, getSandboxViewerToken } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, +}); // ---cut--- const livestreamName = "livestream1"; // For the streamer -const streamerUrl = await getSandboxLivestream(livestreamName); +const streamerData = await getSandboxLivestream(livestreamName); // For viewers, you need a viewer token (different endpoint) -const viewerTokenUrl = await getSandboxViewerToken(livestreamName); +const viewerToken = await getSandboxViewerToken(livestreamName); ``` ## Step 6: Handle multiple peers @@ -231,7 +240,8 @@ To test with multiple participants, create multiple peer tokens with different p ```ts import { useSandbox } from "@fishjam-cloud/react-client"; -const { getSandboxPeerToken } = useSandbox(); +const SANDBOX_API_URL = "your-sandbox-api-url-here"; +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); // ---cut--- // First peer const peer1Response = await getSandboxPeerToken("multiTest", "alice"); @@ -278,13 +288,14 @@ const roomName = `livestream-demo`; ### Issue: Connection failures -**Problem**: Invalid Fishjam ID or network issues. +**Problem**: Invalid Fishjam ID, invalid Sandbox API URL, disabled Sandbox API, or network issues. **Solution**: -1. Verify your Fishjam ID in the Fishjam Dashboard -2. Check network connectivity -3. Ensure you're using the sandbox environment +1. Verify your Fishjam ID in the Fishjam Dashboard. +2. Verify your Sandbox API URL in the [Sandbox tab](https://fishjam.io/app/sandbox). +3. Make sure the Sandbox API is enabled. +4. Check network connectivity. ## Security reminder @@ -292,23 +303,21 @@ const roomName = `livestream-demo`; **The Sandbox API is not safe for production!** - No authentication required -- Anyone with your Fishjam ID can join rooms +- Anyone with your Sandbox API URL can create rooms and peer tokens - Identical room/peer names get the same tokens - No rate limiting or abuse protection Only use the Sandbox API for development and testing. ::: -## Resetting your app - -If you need to reset your Sandbox API: +## Managing your Sandbox API -1. Go to [Fishjam Dashboard](https://fishjam.io/app/sandbox) -2. Click **Settings** -3. Click **Reset App** -4. Get your new Fishjam ID +Manage the Sandbox API from the [Sandbox tab](https://fishjam.io/app/sandbox): -This will invalidate all existing tokens (including the management token!) and give you a fresh sandbox environment. +- If your Sandbox API URL is exposed or credentials are compromised, click **Generate new URL**. This invalidates the old URL. +- If you want to stop using it, click **Disable Sandbox API**. +- When you want to use it again, click **Enable Sandbox API**. + Your `FISHJAM_ID` is still required by `FishjamProvider` to connect to the Fishjam media server. The Sandbox API URL is only used to request test room and peer tokens. ## Next steps diff --git a/versioned_docs/version-0.26.0/how-to/backend/selective-subscriptions.mdx b/versioned_docs/version-0.29.0/how-to/backend/selective-subscriptions.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/backend/selective-subscriptions.mdx rename to versioned_docs/version-0.29.0/how-to/backend/selective-subscriptions.mdx diff --git a/versioned_docs/version-0.26.0/how-to/backend/server-setup.mdx b/versioned_docs/version-0.29.0/how-to/backend/server-setup.mdx similarity index 54% rename from versioned_docs/version-0.26.0/how-to/backend/server-setup.mdx rename to versioned_docs/version-0.29.0/how-to/backend/server-setup.mdx index 8d303cba..71dedaf1 100644 --- a/versioned_docs/version-0.26.0/how-to/backend/server-setup.mdx +++ b/versioned_docs/version-0.29.0/how-to/backend/server-setup.mdx @@ -61,9 +61,11 @@ Let's setup everything you need to start communicating with a Fishjam instance. First of all, view your app in the [**Fishjam developer panel**](https://fishjam.io/app) and copy your **Fishjam ID** and the **Management Token**. They are required to proceed. Now, we are ready to dive into the code. +`FishjamClient.create` constructs the client and pings the Fishjam backend with the supplied credentials, so a bad `fishjamId` or `managementToken` fails at startup instead of on the first room operation. + - + ```ts process.env.FISHJAM_ID = "aaa"; process.env.FISHJAM_MANAGEMENT_TOKEN = "bbb"; @@ -71,10 +73,17 @@ They are required to proceed. Now, we are ready to dive into the code. // ---cut--- import { FishjamClient } from '@fishjam-cloud/js-server-sdk'; - const fishjamId = process.env.FISHJAM_ID; - const managementToken = process.env.FISHJAM_MANAGEMENT_TOKEN; + let fishjamClient = await FishjamClient.create({ + fishjamId: process.env.FISHJAM_ID!, + managementToken: process.env.FISHJAM_MANAGEMENT_TOKEN!, + }); - const fishjamClient = new FishjamClient({ fishjamId, managementToken }); + // The above is roughly equivalent to: + fishjamClient = new FishjamClient({ + fishjamId: process.env.FISHJAM_ID!, + managementToken: process.env.FISHJAM_MANAGEMENT_TOKEN!, + }); + await fishjamClient.checkCredentials(); ``` @@ -85,10 +94,14 @@ They are required to proceed. Now, we are ready to dive into the code. import os from fishjam import FishjamClient - fishjam_id = os.environ["FISHJAM_ID"] - management_token = os.environ["FISHJAM_MANAGEMENT_TOKEN"] + fishjam_client = FishjamClient.create_and_verify( + fishjam_id=os.environ["FISHJAM_ID"], + management_token=os.environ["FISHJAM_MANAGEMENT_TOKEN"], + ) - fishjam_client = FishjamClient(fishjam_id, management_token) + # The above is roughly equivalent to: + fishjam_client = FishjamClient(...) + fishjam_client.check_credentials() ``` @@ -213,7 +226,9 @@ There are two options to obtain these. ### Webhooks -Simply pass the your webhook url as a `webhookUrl` parameter when creating a room. +Configure your webhook URL in the **Webhooks** tab of the [Fishjam Dashboard](https://fishjam.io/app). Fishjam then delivers all notifications to that URL. + +We recommend also enabling **notification batching** when creating a room. Fishjam then coalesces several notifications into a single request, delivering them faster and with fewer HTTP requests — which improves your backend's response time under load. @@ -226,8 +241,7 @@ Simply pass the your webhook url as a `webhookUrl` parameter when creating a roo managementToken: "bbb", }); // ---cut--- - const webhookUrl = "https://example.com/"; - await fishjamClient.createRoom({ webhookUrl }); + await fishjamClient.createRoom({ batchWebhookNotifications: true }); ``` @@ -237,7 +251,9 @@ Simply pass the your webhook url as a `webhookUrl` parameter when creating a roo ```python from fishjam import RoomOptions - options = RoomOptions(webhook_url="https://example.com/") + options = RoomOptions( + batch_webhook_notifications=True, + ) fishjam_client.create_room(options) ``` @@ -246,6 +262,113 @@ Simply pass the your webhook url as a `webhookUrl` parameter when creating a roo +On the receiving side, decode the raw request body with the SDK's decoder, then iterate the result and react to the events you care about. The decoder returns a list of notifications and transparently unwraps a batch — a single notification simply comes back as a one-element list, so the same handler works whether or not batching is enabled. + + + + + ```ts + import { decodeServerNotifications } from '@fishjam-cloud/js-server-sdk'; + + declare const rawBody: Buffer; + // ---cut--- + for (const { type, notification } of decodeServerNotifications(rawBody)) { + switch (type) { + case 'peerConnected': + console.log(`Peer ${notification.peerId} joined room ${notification.roomId}`); + break; + case 'peerDisconnected': + console.log(`Peer ${notification.peerId} left room ${notification.roomId}`); + break; + case 'roomCreated': + console.log(`Room ${notification.roomId} created`); + break; + default: + break; + } + } + ``` + + + + + + ```python + from fishjam import decode_server_notifications + from fishjam.events import ( + ServerMessagePeerConnected, + ServerMessagePeerDisconnected, + ServerMessageRoomCreated, + ) + + for notification in decode_server_notifications(raw_body): + match notification: + case ServerMessagePeerConnected(): + print(f"Peer {notification.peer_id} joined room {notification.room_id}") + case ServerMessagePeerDisconnected(): + print(f"Peer {notification.peer_id} left room {notification.room_id}") + case ServerMessageRoomCreated(): + print(f"Room {notification.room_id} created") + case _: + ... + ``` + + + + + +#### Verifying webhook signatures + +Every webhook request is signed so you can confirm it really came from Fishjam. Each delivery carries an `x-fishjam-signature-256: sha256=` header — an HMAC-SHA256 of the **raw request body**, keyed with your webhook secret. Find (and rotate) that secret in the **Webhooks** tab of the [Fishjam Dashboard](https://fishjam.io/app). + +Verify the header against the raw body **before** decoding, and reject mismatches with `401`. Verification needs the exact bytes Fishjam sent, so read the raw body before any parsing. + + + + + ```ts + declare const rawBody: Buffer; + declare const signatureHeader: string; + // ---cut--- + import { verifyWebhookSignature, decodeServerNotifications } from '@fishjam-cloud/js-server-sdk'; + + const secret = process.env.FISHJAM_WEBHOOK_SECRET!; + + // rawBody: Buffer, signatureHeader: req.headers['x-fishjam-signature-256'] + if (!verifyWebhookSignature(rawBody, signatureHeader, secret)) { + // respond with 401 here — how depends on your framework, see the examples linked below + throw new Error('Invalid webhook signature'); + } + + // signature is valid — safe to decode + const notifications = decodeServerNotifications(rawBody); + ``` + + + + + + ```python + import os + from fishjam import verify_webhook_signature, decode_server_notifications + + secret = os.environ["FISHJAM_WEBHOOK_SECRET"] + + # raw_body: bytes, signature_header: request.headers["x-fishjam-signature-256"] + if not verify_webhook_signature(raw_body, signature_header, secret): + # respond with 401 here — how depends on your framework, see the examples linked below + raise PermissionError("Invalid webhook signature") + + # signature is valid — safe to decode + notifications = decode_server_notifications(raw_body) + ``` + + + + + +See the [Fastify](../../how-to/backend/fastify-example#webhooks) and [FastAPI](../../how-to/backend/fastapi-example#webhooks) examples for a full webhook handler wired into a web framework. + ### SDK Notifier Our SDKs come equipped with a Notifier allowing you to subscribe for messages. @@ -276,6 +399,7 @@ It sets up a websocket connection with a Fishjam instance and provides a simple ```python import asyncio from fishjam import FishjamNotifier + from fishjam.events import ServerMessageRoomCreated notifier = FishjamNotifier(fishjam_id, management_token) diff --git a/versioned_docs/version-0.26.0/how-to/backend/whip-whep.mdx b/versioned_docs/version-0.29.0/how-to/backend/whip-whep.mdx similarity index 96% rename from versioned_docs/version-0.26.0/how-to/backend/whip-whep.mdx rename to versioned_docs/version-0.29.0/how-to/backend/whip-whep.mdx index 8c3ef4e4..a5b61c6c 100644 --- a/versioned_docs/version-0.26.0/how-to/backend/whip-whep.mdx +++ b/versioned_docs/version-0.29.0/how-to/backend/whip-whep.mdx @@ -71,14 +71,14 @@ You can read about this in detail in [Production Livestreaming with Server SDKs] ```python - from fishjam import FishjamClient + from fishjam import FishjamClient, RoomOptions fishjam_client = FishjamClient( fishjam_id=fishjam_id, management_token=management_token, - ); + ) - room = fishjam_client.create_room(room_type="livestream") + room = fishjam_client.create_room(RoomOptions(room_type="livestream")) streamer_token = fishjam_client.create_livestream_streamer_token(room.id) # [!code highlight] ``` @@ -150,14 +150,14 @@ You can read about this in detail in [Production Livestreaming with Server SDKs] ```python - from fishjam import FishjamClient + from fishjam import FishjamClient, RoomOptions fishjam_client = FishjamClient( fishjam_id=fishjam_id, management_token=management_token, - ); + ) - room = fishjam_client.create_room(room_type="livestream", public=False) + room = fishjam_client.create_room(RoomOptions(room_type="livestream", public=False)) # ... diff --git a/versioned_docs/version-0.26.0/how-to/client/_category_.json b/versioned_docs/version-0.29.0/how-to/client/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/_category_.json rename to versioned_docs/version-0.29.0/how-to/client/_category_.json diff --git a/versioned_docs/version-0.26.0/how-to/client/background-streaming.mdx b/versioned_docs/version-0.29.0/how-to/client/background-streaming.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/background-streaming.mdx rename to versioned_docs/version-0.29.0/how-to/client/background-streaming.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/connecting.mdx b/versioned_docs/version-0.29.0/how-to/client/connecting.mdx similarity index 74% rename from versioned_docs/version-0.26.0/how-to/client/connecting.mdx rename to versioned_docs/version-0.29.0/how-to/client/connecting.mdx index 26c6318e..f96524e0 100644 --- a/versioned_docs/version-0.26.0/how-to/client/connecting.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/connecting.mdx @@ -3,8 +3,8 @@ sidebar_position: 3 description: Connect to a Fishjam room using a peer token and room URL obtained from your backend. --- -import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; # Connecting @@ -17,25 +17,24 @@ your Room). - + -Once you create your account on [Fishjam](https://fishjam.io), you will have access to the Sandbox environment as part of the Mini Jar plan. -While using the Sandbox environment, [you can use the Sandbox API](../backend/sandbox-api-testing) to generate peer tokens for testing or development purposes. +Once you create your account on [Fishjam](https://fishjam.io), you can [use the Sandbox API](../backend/sandbox-api-testing) to generate peer tokens for testing or development purposes without setting up your own backend. This is basically a service that will create a Room, add your app as -the Room's Peer, and return the token required to use that Room. +the Room's Peer, and return the token required to use that Room. It is available to all accounts, including the free **Mini Jar** plan. +For React/React Native apps, copy both the Fishjam ID from the [Dashboard tab](https://fishjam.io/app) and Sandbox API URL from the [Sandbox tab](https://fishjam.io/app/sandbox): the Sandbox API URL is used to get peer tokens, while the Fishjam ID is passed to `FishjamProvider` for media server access. ```ts import { useSandbox } from "@fishjam-cloud/react-client"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; const roomName = "room"; const peerName = "user"; // ---cut--- -// The `useSandbox` hook gets the fishjamId from FishjamProvider -// It will work ONLY with the FISHJAM_ID of the Sandbox environment -const { getSandboxPeerToken } = useSandbox(); +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const peerToken = await getSandboxPeerToken(roomName, peerName); ``` @@ -44,13 +43,12 @@ const peerToken = await getSandboxPeerToken(roomName, peerName); ```ts import { useSandbox } from "@fishjam-cloud/react-native-client"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; const roomName = "room"; const peerName = "user"; // ---cut--- -// The `useSandbox` hook gets the fishjamId from FishjamProvider -// It will work ONLY with the FISHJAM_ID of the Sandbox environment -const { getSandboxPeerToken } = useSandbox(); +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const peerToken = await getSandboxPeerToken(roomName, peerName); ``` @@ -58,10 +56,10 @@ const peerToken = await getSandboxPeerToken(roomName, peerName); - + -For the production app, you need to implement your own backend service that will provide the user with a **Peer Token**. To do that, -follow our [server setup instructions](../backend/server-setup). +For production, you need to implement your own backend service that will provide the user with a **Peer Token**. To do that, +follow our [server setup instructions](../backend/server-setup). The **Standard Jar** plan is recommended for production deployments. @@ -75,7 +73,7 @@ the [`joinRoom`](../../api/web/functions/useConnection#joinroom) function. ```tsx -const PEER_TOKEN = "some-peer-token"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; // ---cut-before--- import { useConnection, useSandbox } from "@fishjam-cloud/react-client"; import React, { useCallback } from "react"; @@ -83,13 +81,15 @@ import React, { useCallback } from "react"; export function JoinRoomButton() { const { joinRoom } = useConnection(); // [!code highlight] // get the peer token from sandbox or your backend - const { getSandboxPeerToken } = useSandbox(); + const { getSandboxPeerToken } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, + }); const onJoinRoomPress = useCallback(async () => { // [!code highlight:5] const peerToken = await getSandboxPeerToken("Room", "User"); await joinRoom({ peerToken }); - }, [joinRoom]); + }, [joinRoom, getSandboxPeerToken]); return ; } @@ -103,13 +103,17 @@ import React, { useCallback } from "react"; import { Button } from "react-native"; import { useConnection, useSandbox } from "@fishjam-cloud/react-native-client"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; + export function JoinRoomButton() { const { joinRoom } = useConnection(); // [!code highlight] - // fishjamId is provided through FishjamProvider - const { getSandboxPeerToken } = useSandbox(); + // get the peer token from sandbox or your backend + const { getSandboxPeerToken } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, + }); const onPressJoin = useCallback(async () => { - // in production environment, get the peerToken from your backend + // in production apps, get the peerToken from your own backend instead const peerToken = await getSandboxPeerToken("Room", "User"); await joinRoom({ peerToken }); // [!code highlight] diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/_category_.json b/versioned_docs/version-0.29.0/how-to/client/custom-sources/_category_.json new file mode 100644 index 00000000..2eaff9da --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Custom sources", + "position": 8, + "link": { + "type": "doc", + "id": "how-to/client/custom-sources/index" + } +} diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/index.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/index.mdx new file mode 100644 index 00000000..bf747dce --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/index.mdx @@ -0,0 +1,115 @@ +--- +title: "Custom sources" +description: Publish any video or audio content to a Fishjam room, from canvas and WebGPU on the web to Vision Camera and native frame pipelines in React Native. +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import DocCardList from "@theme/DocCardList"; + +# Custom sources + +Custom sources allow you to publish media that doesn't come straight from the camera, microphone or screen share, for example a game render loop or an ML-processed camera feed. Any content you can produce as video frames or audio samples can be published. + +:::important + +If you only wish to send plain camera, microphone or screen share output through Fishjam, then you most likely should refer to [Streaming media](../start-streaming.mdx), [Managing devices](../managing-devices.mdx) and [Screen sharing](../screensharing.mdx) instead of this section. + +::: + +Every custom source follows the same contract: you register a `MediaStream` under a stable source ID with the `useCustomSource` hook ([Web](../../../api/web/functions/useCustomSource.md) · [React Native](../../../api/mobile/functions/useCustomSource.md)), and Fishjam publishes its video track as a `customVideo` track and its audio track as a `customAudio` track. Other peers receive them like any other track. + +## Choose a guide + +| Guide | Platform | Use it when | +| ------------------------------------------------ | ------------------ | --------------------------------------------------------------------------------------------- | +| [Web](./web.mdx) | 🌐 Web | You have a `MediaStream` from a canvas, a media element, Web Audio, or a library like Smelter | +| [React Native](./react-native.mdx) | 📱 Mobile | You have a React Native `MediaStream` to publish, or want to publish app-generated audio | +| [Vision Camera](./vision-camera.mdx) | 📱 Mobile | You want to publish a VisionCamera feed, optionally running frame processors on it | +| [WebGPU effects](./webgpu-effects.mdx) | 🌐 Web · 📱 Mobile | You want to draw your own shaders, overlays or effects into the published video | +| [Low-level frame API](./low-level-frame-api.mdx) | 📱 Mobile | You produce video frames yourself, e.g. from a native pipeline or your own renderer | + +:::info[Platform support] + +On the web you can publish both video and audio from any `MediaStream`. In React Native, custom video comes from the video guides in this section, and custom audio from the [`useCustomAudioSource`](./react-native.mdx#publish-custom-audio) hook, which publishes PCM samples your app pushes. + +::: + +## Receiving custom tracks + +Custom tracks published by other peers show up in the `usePeers` hook ([Web](../../../api/web/functions/usePeers.md) · [React Native](../../../api/mobile/functions/usePeers.md)), bucketed into the `customVideoTracks` and `customAudioTracks` arrays of each peer. + + + + +```tsx +import React, { FC } from "react"; + +const VideoRenderer: FC<{ stream?: MediaStream | null }> = (_) => + + +```tsx +import React from "react"; +import { View } from "react-native"; +import { usePeers, RTCView } from "@fishjam-cloud/react-native-client"; + +export function RemoteCustomVideos() { + const { remotePeers } = usePeers(); + + return ( + + {remotePeers.map((peer) => + peer.customVideoTracks.map( + (track) => + track.stream && ( + + ), + ), + )} + + ); +} +``` + +Incoming `customAudioTracks` are played back automatically; you don't render anything for them. + + + + +## Guides in this section + + + +## Further reading + +- [How custom sources work](../../../explanation/custom-sources.mdx): concepts behind the pipeline +- API reference: [`useCustomSource` (Web)](../../../api/web/functions/useCustomSource.md), [`useCustomSource` (React Native)](../../../api/mobile/functions/useCustomSource.md), [`useCustomAudioSource` (React Native)](../../../api/mobile/functions/useCustomAudioSource.md), [Vision Camera Source package](../../../api/vision-camera-source/index.md), [Custom Video Source package](../../../api/custom-video-source/index.md) diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/low-level-frame-api.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/low-level-frame-api.mdx new file mode 100644 index 00000000..c1bc079f --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/low-level-frame-api.mdx @@ -0,0 +1,199 @@ +--- +title: "Publish frames with the low-level API" +sidebar_position: 5 +sidebar_label: "Low-level frame API 📱" +description: Publish video frames from any source, such as a native ML pipeline or your own renderer, with the generic custom video source layer. +--- + +# Publish frames with the low-level API Mobile + +:::note +This guide is exclusively for **Mobile** (React Native) applications. +::: + +`@fishjam-cloud/react-native-custom-video-source` is the generic layer under the [Vision Camera integration](./vision-camera). Use it directly when your frames come from another source, such as a native ML pipeline or your own renderer. It is built on the raw track primitives of `@fishjam-cloud/react-native-webrtc`, covered [at the end of this guide](#raw-track-primitives). + +## Pick a mode + +The two modes differ in how you produce frames: + +| Mode | Hook | Use it when | +| -------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------- | +| **Forwarding** | `useManagedForwardTrack` | You already have finished native buffers (`CVPixelBufferRef` on iOS, `AHardwareBuffer*` on Android) | +| **Render-target (pooled)** | `useManagedPooledTrack` | You render the frames yourself; the hook allocates GPU-shareable surfaces for you to draw into | + +Each hook manages the track's asynchronous lifecycle: creation, the published `stream`, and teardown. Your code only supplies frames. + +## Prerequisites + +- `@fishjam-cloud/react-native-webrtc` and `@fishjam-cloud/react-native-client`, with your app wrapped in `FishjamProvider` +- The New Architecture; custom video tracks require it and reject with a clear error on the old architecture + +```bash npm2yarn +npm install @fishjam-cloud/react-native-custom-video-source +``` + +## Publish the managed stream + +Both hooks return a `stream`. Publish it with [`useCustomSource`](./react-native), like any other custom source: + +```tsx +import { useEffect } from "react"; +import { + useCustomSource, + type MediaStream, +} from "@fishjam-cloud/react-native-client"; + +// ---cut--- +export function usePublishStream(sourceId: string, stream: MediaStream | null) { + const { setStream } = useCustomSource(sourceId); + + useEffect(() => { + if (!stream) return; + setStream(stream); + return () => { + setStream(null); + }; + }, [stream, setStream]); +} +``` + +## Forward finished buffers + +`useManagedForwardTrack` creates and owns the track; hand each buffer pointer to `forwardFrame`: + +```tsx +import { useManagedForwardTrack } from "@fishjam-cloud/react-native-custom-video-source"; +import { forwardFrame } from "@fishjam-cloud/react-native-webrtc"; + +declare function getNextFrameBuffer(): bigint; // your native pipeline + +// ---cut--- +const { track, stream, error } = useManagedForwardTrack(true /* enabled */); + +// publish `stream` via useCustomSource, then per frame: +if (track) { + forwardFrame(track, { + nativeBuffer: getNextFrameBuffer(), + }); +} +``` + +Buffer requirements: + +- `nativeBuffer` is a retainable, IOSurface-backed `CVPixelBufferRef` (iOS) or an `AHardwareBuffer*` (Android), passed as a `bigint` pointer. +- The SDK retains the buffer for encoding; you may release your reference immediately after `forwardFrame` returns. +- `timestampNs` is optional: when omitted, frames are stamped with the native monotonic clock. Pass your own capture timestamps only if you need to align the video with an audio track you also produce. +- `rotation` (`0 | 90 | 180 | 270`) rotates the frame for the receiver. Don't set it if your buffers are already upright, or the frame gets rotated twice. + +:::warning[One worklet runtime per track] + +`forwardFrame` and `pushFrame` are worklet-safe, but a track's sink binds to the first worklet runtime that touches it. Feed each track from a single runtime (or from the JS thread) consistently. + +::: + +## Render into pooled surfaces + +`useManagedPooledTrack` allocates a pool of native GPU-shareable surfaces; draw into a slot and hand it back with `pushFrame`: + +```tsx +import { useManagedPooledTrack } from "@fishjam-cloud/react-native-custom-video-source"; +import { pushFrame } from "@fishjam-cloud/react-native-webrtc"; + +declare function renderInto(surfaceHandle: bigint): void; // your renderer +declare function nowNanoseconds(): number; + +// ---cut--- +const { track, stream, bufferDescriptors, error } = useManagedPooledTrack( + true, // enabled + 720, // width + 1280, // height + 3, // poolSize +); + +let nextSlot = 0; + +function renderFrame() { + if (!track || !bufferDescriptors) return; + + const descriptor = bufferDescriptors[nextSlot]; + nextSlot = (nextSlot + 1) % bufferDescriptors.length; + + renderInto(descriptor.surfaceHandle); + pushFrame(track, { + bufferIndex: descriptor.index, + timestampNs: nowNanoseconds(), + }); +} +``` + +Each `WorkletBufferDescriptor` carries `{ index, surfaceHandle, width, height }`. Import each `surfaceHandle` into your GPU once and cache the result per index; don't re-import it every frame. + +The surfaces are: + +| Platform | Surface type | Pixel format | Import as | +| -------- | ----------------- | ------------ | ------------ | +| iOS | `IOSurface` | BGRA8 | `bgra8unorm` | +| Android | `AHardwareBuffer` | RGBA8 | `rgba8unorm` | + +Rendering with the wrong format typically shows up as swapped red/blue channels, or the import is rejected outright. + +Unlike forwarding, `timestampNs` is required here and must be strictly increasing. + +### Synchronize with your GPU + +If your renderer works asynchronously, pass a `fence` so the encoder waits for your rendering to finish instead of reading a half-drawn surface: + +- **iOS**: `handle` is an `MTLSharedEvent` pointer and `signaledValue` the value your GPU work signals. +- **Android**: `handle` is a sync file descriptor; pass `0n` as `signaledValue`. + +If you render with WebGPU, prefer [`useVisionCameraWebGpuSource`](./webgpu-effects) or the `/webgpu` toolkit of this package; they handle fencing, surface import, and frame lifetimes for you. + +## Lifecycle and errors + +- `track`, `stream` and `bufferDescriptors` are `null` until asynchronous creation finishes; failures surface in the hook's `error` field rather than throwing. +- Set `enabled: false` to tear everything down; the hooks stop the tracks (and dispose the pool) in the correct order on unmount too. +- Changing the pooled dimensions reallocates the pool, so release any GPU objects you imported when `bufferDescriptors` changes. + +## Raw track primitives + +The managed hooks wrap four primitives from `@fishjam-cloud/react-native-webrtc`: `createCustomVideoBufferPool`, `createCustomVideoTrack`, `pushFrame` and `forwardFrame`. Use them directly only when a React hook cannot own the lifecycle, for example inside a headless native-driven runtime: + +```tsx +import { + createCustomVideoBufferPool, + createCustomVideoTrack, +} from "@fishjam-cloud/react-native-webrtc"; + +// ---cut--- +const pool = await createCustomVideoBufferPool({ + width: 720, + height: 1280, + poolSize: 3, +}); +const { stream, track } = await createCustomVideoTrack({ pool }); + +// render into pool.buffers[i].surfaceHandle, then pushFrame(track, ...) + +// Teardown; order matters: +stream.getTracks().forEach((mediaStreamTrack) => mediaStreamTrack.stop()); +await pool.dispose(); +``` + +When using the primitives directly, you must follow the rules the hooks otherwise enforce: + +- A pool binds to exactly one track. +- Stop the track's stream before disposing the pool; `dispose()` rejects while the track is live. +- Stopping a track never frees the pool; you own it and must dispose it yourself. +- `createCustomVideoTrack()` without a pool creates a forwarding track for `forwardFrame`. + +## WebGPU render targets + +The `/webgpu` entry point of this package is a camera-rendering toolkit for the pooled mode. It provides a shared camera-capable `GPUDevice`, camera sampling from your shaders, a passthrough pipeline, and crop helpers. It is covered in [WebGPU effects](./webgpu-effects). + +## Related guides + +- [Custom sources in React Native](./react-native): publishing the stream +- [Vision Camera](./vision-camera): the ready-made camera integration built on this layer +- [How custom sources work](../../../explanation/custom-sources) +- API reference: [Custom Video Source package](../../../api/custom-video-source/index) diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/react-native.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/react-native.mdx new file mode 100644 index 00000000..ca34a0c7 --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/react-native.mdx @@ -0,0 +1,148 @@ +--- +title: "Custom sources in React Native" +sidebar_position: 2 +sidebar_label: "React Native 📱" +description: Publish any React Native MediaStream or app-generated audio to a Fishjam room with the useCustomSource and useCustomAudioSource hooks. +--- + +# Custom sources in React Native Mobile + +:::note +This guide is exclusively for **Mobile** (React Native) applications. +::: + +`@fishjam-cloud/react-native-client` provides two hooks for publishing custom sources. Your app must be wrapped in [`FishjamProvider`](../../../api/mobile/functions/FishjamProvider). + +- [`useCustomSource`](../../../api/mobile/functions/useCustomSource) publishes a `MediaStream`. It is the same hook that is available [on the web](./web), typed for the React Native [`MediaStream`](../../../api/mobile/classes/MediaStream). The stream typically comes from the [Vision Camera integration](./vision-camera) or the [low-level frame API](./low-level-frame-api), whose hooks create it for you, but any `MediaStream` you hold works. +- [`useCustomAudioSource`](../../../api/mobile/functions/useCustomAudioSource) publishes audio your app generates itself: you push PCM samples and the hook manages the track and its stream. See [Publish custom audio](#publish-custom-audio). + +## Publish a stream + +Set the stream on a stable source ID; set `null` to unpublish. The cleanup function keeps the source in sync with the component lifecycle. + +```tsx +import { useEffect } from "react"; +import { + useCustomSource, + type MediaStream, +} from "@fishjam-cloud/react-native-client"; + +// ---cut--- +export function usePublishStream(stream: MediaStream | null) { + const { setStream } = useCustomSource("my-custom-source"); + + useEffect(() => { + if (!stream) return; + setStream(stream); + return () => { + setStream(null); + }; + }, [stream, setStream]); +} +``` + +:::info[When tracks are actually published] + +Tracks are sent to Fishjam only while the peer is connected to a room. A stream set before joining is queued and published as soon as the connection is established, and pending sources are re-published automatically after a reconnect. Calls to `setStream` are serialized internally, so replacing one stream with another in quick succession is safe. + +::: + +:::important + +Custom sources are shared by ID: every `useCustomSource` call with the same source ID returns the same state, so multiple components can control and read one source. + +::: + +## Show a self-view + +The `stream` returned by `useCustomSource` renders like any other stream: + +```tsx +import React from "react"; +import { useCustomSource, RTCView } from "@fishjam-cloud/react-native-client"; + +// ---cut--- +export function SelfView() { + const { stream } = useCustomSource("my-custom-source"); + + if (!stream) return null; + return ( + + ); +} +``` + +## Remove the source + +```tsx +import { useCustomSource } from "@fishjam-cloud/react-native-client"; +// ---cut--- +const { setStream } = useCustomSource("my-custom-source"); +// ... +await setStream(null); +``` + +Removing a source unpublishes its tracks but does not stop them; the producer of the stream owns the tracks and should stop them itself. + +## Publish custom audio + +React Native has no equivalent of the web's `captureStream()` or Web Audio, so audio your app generates does not arrive as a `MediaStream`. The [`useCustomAudioSource`](../../../api/mobile/functions/useCustomAudioSource) hook covers this case: it creates a custom audio track, publishes it under its source ID, and cleans it up. Your code pushes raw PCM samples with `pushAudioSamples` whenever your source produces them, for example a synthesizer, a decoder, or [`react-native-audio-api`](https://docs.swmansion.com/react-native-audio-api/): + +```tsx +import { + useCustomAudioSource, + pushAudioSamples, +} from "@fishjam-cloud/react-native-client"; + +declare function onAudioChunk(callback: (chunk: Float32Array) => void): void; // your audio source + +// ---cut--- +const { startStreaming, stopStreaming, track } = useCustomAudioSource({ + sampleRateHz: 48000, + channelCount: 1, +}); + +await startStreaming(); + +// Whenever your source produces audio: +onAudioChunk((chunk) => { + if (track) pushAudioSamples(track, chunk); +}); + +// When done: +await stopStreaming(); +``` + +The published track behaves like a live microphone: pushes are re-paced into a continuous stream, and pauses in pushing play as silence. The device microphone is not involved; publishing does not trigger the recording permission, and microphone capture stays with [`useMicrophone`](../../../api/mobile/functions/useMicrophone). + +Notes on pushing samples: + +- Push any chunk size; the native layer re-frames and paces it. `Float32Array` samples are expected in `[-1, 1]`; `Int16Array` is taken as-is. Stereo tracks take interleaved samples. +- The `track` handle is plain and worklet-serializable, so samples can be pushed straight from a worklet without hopping through the JS thread. +- Pushed-but-not-yet-sent audio is buffered up to `maxBufferedDurationMs` and drains in real time, so a long clip (for example a text-to-speech utterance) can be handed over in one call. + +### Options + +| Option | Default | Description | +| ----------------------- | --------------------- | ---------------------------------------------------------------------------------------------------- | +| `sourceId` | `"customAudioSource"` | Source ID the track is published under. Give each instance that streams at the same time its own ID. | +| `sampleRateHz` | `48000` | Sample rate of the PCM you push; a positive multiple of `100`. Any rate is resampled downstream. | +| `channelCount` | `1` | `1` for mono, `2` for interleaved stereo. | +| `maxBufferedDurationMs` | `60000` | How much pushed-but-not-yet-sent audio to hold, in milliseconds, before the oldest is dropped. | + +Custom audio tracks require the New Architecture. On the old architecture `startStreaming` does not throw; it fails internally and the failure surfaces in the hook's `error` field. + +## Receiving on other peers + +Custom tracks arrive in the `customVideoTracks` and `customAudioTracks` arrays of each peer returned by `usePeers`. See [Receiving custom tracks](./index.mdx#receiving-custom-tracks). + +## Related guides + +- [Vision Camera](./vision-camera): publish a camera feed with frame processors +- [WebGPU effects](./webgpu-effects): draw your own content into the published video +- [Low-level frame API](./low-level-frame-api): publish frames from your own pipeline +- [How custom sources work](../../../explanation/custom-sources) diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/vision-camera.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/vision-camera.mdx new file mode 100644 index 00000000..6db0eeb2 --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/vision-camera.mdx @@ -0,0 +1,137 @@ +--- +title: "Publish a Vision Camera feed" +sidebar_position: 3 +sidebar_label: "Vision Camera 📱" +description: Publish a react-native-vision-camera feed to Fishjam, optionally running frame-processor plugins on the published frames. +--- + +# Publish a Vision Camera feed Mobile + +:::note +This guide is exclusively for **Mobile** (React Native) applications. +::: + +`@fishjam-cloud/react-native-vision-camera-source` publishes a [VisionCamera](https://react-native-vision-camera.com) feed to Fishjam. Its hooks work like the other Fishjam source hooks ([`useCamera`](../../../api/mobile/functions/useCamera), [`useScreenShare`](../../../api/mobile/functions/useScreenShare), [`useCustomSource`](../../../api/mobile/functions/useCustomSource)): they create the underlying track, publish it, and clean up on unmount. Each camera frame is handed to Fishjam without copying its pixels. + +Use this package when you need VisionCamera capabilities alongside a Fishjam call, such as frame-processor plugins for on-device ML, precise device control, or [your own WebGPU rendering](./webgpu-effects) drawn into the published video. If you only want to stream the camera, use [`useCamera`](../start-streaming) instead. + +## Prerequisites + +- `react-native-vision-camera` **v5** and `react-native-vision-camera-worklets` +- [`react-native-worklets`](https://docs.swmansion.com/react-native-worklets/) with its Babel plugin configured (required by VisionCamera's frame outputs) +- `@fishjam-cloud/react-native-client` with your app wrapped in `FishjamProvider` (see [Installation](../installation)) +- The New Architecture; custom video tracks require it + +## Install + +```bash npm2yarn +npm install @fishjam-cloud/react-native-vision-camera-source react-native-vision-camera react-native-vision-camera-worklets react-native-worklets +``` + +Add the worklets Babel plugin as the last entry in your Babel plugins, then restart Metro with a cleared cache: + +```js title='babel.config.js' +module.exports = { + presets: ["babel-preset-expo"], + plugins: ["react-native-worklets/plugin"], +}; +``` + +Camera permission setup (usage strings, requesting at runtime) follows the standard VisionCamera flow; see the [VisionCamera getting started guide](https://react-native-vision-camera.com/docs/guides). + +## Publish the camera + +Pass the hook's `frameOutput` to VisionCamera's `useCamera` outputs. The returned `stream` is your self-view; the same feed is published to the room under the given source ID. + +```tsx +import React from "react"; +import { + useCamera as useVisionCamera, + useCameraPermission, +} from "react-native-vision-camera"; +import { RTCView } from "@fishjam-cloud/react-native-client"; +import { useVisionCameraSource } from "@fishjam-cloud/react-native-vision-camera-source"; + +export function CameraPublisher() { + const { hasPermission } = useCameraPermission(); + + const { frameOutput, stream } = useVisionCameraSource("my-camera"); + + useVisionCamera({ + device: "front", + isActive: hasPermission, + outputs: [frameOutput], + }); + + if (!stream) return null; + return ( + + ); +} +``` + +Frame rotation and timestamps are handled for you: the hook normalizes VisionCamera's per-platform timestamp units onto one monotonic timeline and applies the frame's orientation automatically. + +Other peers receive the feed among their [`customVideoTracks`](./index.mdx#receiving-custom-tracks). + +:::warning[On-screen drawing is not published] + +The published track carries the camera frames exactly as captured. Anything you draw on top of the preview (React Native views, a [Skia](https://shopify.github.io/react-native-skia/) canvas, or any other overlay) appears only in your local UI and is **not** sent to Fishjam. To render content into the published video itself, use [WebGPU effects](./webgpu-effects.mdx) for effects and overlays on the camera feed, or the [low-level frame API](./low-level-frame-api.mdx) when you produce the frames yourself. + +::: + +## Run frame processors on published frames + +Pass an `onFrame` worklet to process every published frame, for example to run a VisionCamera frame-processor plugin for pose detection or other on-device inference. `onFrame` is for reading frames; it cannot draw into the published feed: + +```tsx +import { useCallback } from "react"; +import type { Frame } from "react-native-vision-camera"; +import { useVisionCameraSource } from "@fishjam-cloud/react-native-vision-camera-source"; + +declare function detectPose(frame: Frame): unknown; + +// ---cut--- +const onFrame = useCallback((frame: Frame) => { + "worklet"; + const pose = detectPose(frame); // any VisionCamera frame-processor plugin + console.log(pose); +}, []); + +const { frameOutput, stream } = useVisionCameraSource("my-camera", { + onFrame, +}); +``` + +:::danger[Frame lifetime] + +`onFrame` runs **after** the frame has been sent to Fishjam, and the frame is valid only for the duration of your synchronous callback; the hook releases it afterwards. Don't store the frame or its buffers for later use. + +::: + +:::warning + +Keep the identity of `onFrame` stable (`useCallback` or module scope). A new function identity re-registers the frame callback on every render. + +::: + +## Options + +| Option | Default | Description | +| -------------------------- | ------------ | --------------------------------------------------------------------------------------------------- | +| `enabled` | `true` | Creates and publishes the track while `true`; tears everything down when `false`. | +| `onFrame` | — | Worklet called with every camera frame after it has been sent. | +| `onFrameDropped` | — | Worklet called with the reason whenever a frame is skipped (for example when the pipeline is busy). | +| `frameIntervalNanoseconds` | `33_333_333` | Fallback frame spacing used when a frame arrives without a usable native timestamp. | + +The options also accept VisionCamera's `FrameOutputOptions`. The hook forces `pixelFormat: 'native'` (the copy-free path) and defaults `dropFramesWhileBusy` to `true`. + +## Next steps + +- Follow the [Vision Camera tutorial](../../../tutorials/vision-camera) for a step-by-step walkthrough +- Draw your own content into the feed with [WebGPU effects](./webgpu-effects) +- API reference: [Vision Camera Source package](../../../api/vision-camera-source/index) diff --git a/versioned_docs/version-0.26.0/how-to/client/custom-sources.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/web.mdx similarity index 78% rename from versioned_docs/version-0.26.0/how-to/client/custom-sources.mdx rename to versioned_docs/version-0.29.0/how-to/client/custom-sources/web.mdx index def2c69b..98f3025b 100644 --- a/versioned_docs/version-0.26.0/how-to/client/custom-sources.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/web.mdx @@ -1,35 +1,30 @@ --- -title: "Custom sources" -sidebar_position: 8 -sidebar_label: "Custom sources 🌐" +title: "Custom sources on the web" +sidebar_position: 1 +sidebar_label: "Web 🌐" description: Stream non-standard video or audio sources (e.g. WebGL, WebGPU, Three.js) through Fishjam in web apps. --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Custom sources Web +# Custom sources on the web Web :::note -This guide is exclusively for **Web** (React) applications. +This guide is exclusively for **Web** (React) applications. For React Native, see [Custom sources in React Native](./react-native). ::: -:::important - -If you only wish to send camera, microphone or screen share output through Fishjam, then you most likely should refer to the documentation in [Streaming media](./start-streaming) and [Managing devices](./managing-devices) instead of this page. - -::: - -This section demonstrates how to stream non-standard video or audio to other peers in your web app. +This guide demonstrates how to stream non-standard video or audio to other peers in your web app. The utilities in this section allow you to integrate Fishjam with powerful browser APIs such as [WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) and [WebGPU](https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API), -or higher level libraries, which leverage these APIs, such as [Three.js](https://threejs.org/), [Smelter](https://smelter.dev) or [PixiJS](https://pixijs.com/) +or higher level libraries, which leverage these APIs, such as [Three.js](https://threejs.org/), [Smelter](https://smelter.dev) or [PixiJS](https://pixijs.com/). +For a complete WebGPU render-and-publish pipeline, see [WebGPU effects](./webgpu-effects.mdx). -## Creating a custom source - [`useCustomSource()`](../../api/web/functions/useCustomSource) +## Creating a custom source - [`useCustomSource()`](../../../api/web/functions/useCustomSource) To create a custom source, you only need to do two things: 1. Call the `useCustomSource` hook. -2. Call the [`setStream`](../../api/web/functions/useCustomSource#setstream) callback provided by the `useCustomSource` hook with a [MediaStream](#how-to-get-a-mediastream-object) object. +2. Call the [`setStream`](../../../api/web/functions/useCustomSource#setstream) callback provided by the `useCustomSource` hook with a [MediaStream](#how-to-get-a-mediastream-object) object. #### Usage Example @@ -47,12 +42,12 @@ useEffect(() => { ### Using a created custom source -Once you have called [`setStream`](../../api/web/functions/useCustomSource#setstream) for a given source ID (in the above example, `"my-custom-source"`), any subsequent calls to `useCustomSource` with the same ID will return the same state. +Once you have called [`setStream`](../../../api/web/functions/useCustomSource#setstream) for a given source ID (in the above example, `"my-custom-source"`), any subsequent calls to `useCustomSource` with the same ID will return the same state. This enables multiple components to control and read a shared custom source. ### Deleting a custom source -If you wish to remove a custom source, then you should call the [`setStream`](../../api/web/functions/useCustomSource#setstream) callback with `null` as its argument. +If you wish to remove a custom source, then you should call the [`setStream`](../../../api/web/functions/useCustomSource#setstream) callback with `null` as its argument. #### Usage Example @@ -180,3 +175,9 @@ If you have a ` + +## Related guides + +- [Custom sources overview](./index.mdx): how custom tracks reach other peers +- [Custom sources in React Native](./react-native) +- [How custom sources work](../../../explanation/custom-sources) diff --git a/versioned_docs/version-0.29.0/how-to/client/custom-sources/webgpu-effects.mdx b/versioned_docs/version-0.29.0/how-to/client/custom-sources/webgpu-effects.mdx new file mode 100644 index 00000000..bd002ff0 --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/custom-sources/webgpu-effects.mdx @@ -0,0 +1,492 @@ +--- +title: "Render WebGPU effects into published video" +sidebar_position: 4 +sidebar_label: "WebGPU effects" +description: Draw your own shaders, overlays and effects into the video you publish to Fishjam, with WebGPU on the web and in React Native. +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Render WebGPU effects into published video + +This guide shows how to render each frame of the published video yourself with WebGPU. Whatever you draw is what other peers receive. + +The rendering code is plain WebGPU on both platforms. The integration differs: + +- On the **web**, render into a ``, capture it with [`captureStream`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream), and publish the stream with [`useCustomSource`](./web.mdx). +- In **React Native**, use the `/webgpu` entry point of `@fishjam-cloud/react-native-vision-camera-source`. For every camera frame, your worklet receives the camera as a GPU texture and an output texture to draw into. The [`useVisionCameraWebGpuSource`](../../../api/vision-camera-source/index.md) hook handles publishing, GPU synchronization with the video encoder, timestamps and frame lifetimes. + + + + +## Publish a canvas + +If you already render with WebGPU (or Three.js, WebGL, or another canvas-based library), this is all the Fishjam-specific code you need: + +```tsx +import { useCustomSource } from "@fishjam-cloud/react-client"; +declare const canvas: HTMLCanvasElement; +// ---cut--- +const { setStream } = useCustomSource("my-canvas"); + +setStream(canvas.captureStream(30)); +``` + +`setStream` comes from the same [`useCustomSource`](./web.mdx) API as any custom source, and other peers receive the feed among their [`customVideoTracks`](./index.mdx#receiving-custom-tracks). + +The rest of this guide builds a worked example that renders the camera in grayscale. Any render pass works the same way: replace the shaders and keep the rest. + +## Browser support + +WebGPU is available in modern Chromium browsers, Safari 26+, and Firefox 141+. It requires a secure context (HTTPS or `localhost`). Always feature-detect with `navigator.gpu` and fall back to a WebGL/canvas path where it matters. + +## Example: the camera in grayscale + +The example has two parts: the shaders, and a component that sets up WebGPU, renders every frame, and publishes the canvas. + +### 1. Write the shaders + +There are two shader stages: + +- The **vertex** stage draws a full-screen triangle, so the fragment stage covers the whole canvas. `uv` spans the visible area. +- The **fragment** stage samples the camera at `uv` and weighs the color channels into gray. + +The camera arrives as a `texture_external`, which TypeGPU cannot declare itself. The camera bindings are therefore written in raw WGSL, and sampling is wrapped in a WGSL-bodied `tgpu.fn` that the fragment shader can call. (On React Native, `createCameraShaderBindings` provides this recipe ready-made.) + +```tsx +/// +// ---cut--- +import tgpu from "typegpu"; +import * as d from "typegpu/data"; +import { dot } from "typegpu/std"; + +// TypeGPU cannot emit `texture_external` bindings itself, so declare them in +// WGSL and sample through a WGSL-bodied `tgpu.fn` that TGSL shaders can call. +const bindingDeclarations = /* wgsl */ ` +@group(0) @binding(0) var cameraTexture: texture_external; +@group(0) @binding(1) var cameraSampler: sampler; +`; + +const sampleCamera = tgpu.fn( + [d.vec2f], + d.vec4f, +)(/* wgsl */ `(uv: vec2f) -> vec4f { + return textureSampleBaseClampToEdge(cameraTexture, cameraSampler, uv); +}`); + +// Full-screen triangle; uv spans the visible area. +const vertexMain = tgpu.vertexFn({ + in: { vertexIndex: d.builtin.vertexIndex }, + out: { position: d.builtin.position, uv: d.location(0, d.vec2f) }, +})((input) => { + const positions = [d.vec2f(-1, -1), d.vec2f(3, -1), d.vec2f(-1, 3)]; + const p = positions[input.vertexIndex]; + return { + position: d.vec4f(p.x, p.y, 0, 1), + uv: d.vec2f((p.x + 1) * 0.5, 1 - (p.y + 1) * 0.5), + }; +}); + +const fragmentMain = tgpu.fragmentFn({ + in: { uv: d.location(0, d.vec2f) }, + out: d.vec4f, +})((input) => { + const color = sampleCamera(input.uv); + const gray = dot(color.xyz, d.vec3f(0.299, 0.587, 0.114)); + return d.vec4f(gray, gray, gray, 1); +}); +``` + +:::note +The shaders are written in [TypeGPU](https://docs.swmansion.com/TypeGPU/) (TGSL): typed TypeScript functions compiled to WGSL by the [`unplugin-typegpu`](https://docs.swmansion.com/TypeGPU/tooling/unplugin-typegpu/) plugin in your bundler (for Vite: `unplugin-typegpu/vite`). TypeGPU is not required; plain WGSL strings work the same. +::: + +### 2. Render and publish + +The component has five stages, marked in the code: get a GPU device, open the camera, build the pipeline, draw every frame, publish the canvas. + +Note stage 4: camera external textures expire with the frame, so the loop imports the current camera frame and rebuilds the bind group on every iteration. + +```tsx +/// +import tgpu from "typegpu"; +import * as d from "typegpu/data"; +import { dot } from "typegpu/std"; + +const bindingDeclarations = /* wgsl */ ` +@group(0) @binding(0) var cameraTexture: texture_external; +@group(0) @binding(1) var cameraSampler: sampler; +`; + +const sampleCamera = tgpu.fn( + [d.vec2f], + d.vec4f, +)(/* wgsl */ `(uv: vec2f) -> vec4f { + return textureSampleBaseClampToEdge(cameraTexture, cameraSampler, uv); +}`); + +const vertexMain = tgpu.vertexFn({ + in: { vertexIndex: d.builtin.vertexIndex }, + out: { position: d.builtin.position, uv: d.location(0, d.vec2f) }, +})((input) => { + const positions = [d.vec2f(-1, -1), d.vec2f(3, -1), d.vec2f(-1, 3)]; + const p = positions[input.vertexIndex]; + return { + position: d.vec4f(p.x, p.y, 0, 1), + uv: d.vec2f((p.x + 1) * 0.5, 1 - (p.y + 1) * 0.5), + }; +}); + +const fragmentMain = tgpu.fragmentFn({ + in: { uv: d.location(0, d.vec2f) }, + out: d.vec4f, +})((input) => { + const color = sampleCamera(input.uv); + const gray = dot(color.xyz, d.vec3f(0.299, 0.587, 0.114)); + return d.vec4f(gray, gray, gray, 1); +}); +// ---cut--- +import React, { useEffect, useRef } from "react"; +import { useCustomSource } from "@fishjam-cloud/react-client"; + +export function GrayscaleCameraPublisher() { + const canvasRef = useRef(null); + const { setStream } = useCustomSource("my-camera"); + + useEffect(() => { + const canvas = canvasRef.current; + if (!canvas || !navigator.gpu) return; // no WebGPU on this browser + + let disposed = false; + let frameHandle = 0; + let camera: MediaStream | undefined; + + const run = async () => { + // 1. Get a GPU device. + const adapter = await navigator.gpu.requestAdapter(); + if (!adapter) return; + const device = await adapter.requestDevice(); + + // 2. Open the camera and play it into a hidden + + +Every camera frame reaches your `onFrame` worklet. Calling `render(...)` gives you the live camera as a GPU texture and an output texture to draw into. Whatever you draw is what peers receive. + +## Prerequisites + +On top of the [Vision Camera setup](./vision-camera.mdx#prerequisites): + +- `react-native-webgpu` ≥ 0.5.15 +- `unplugin-typegpu` in your app's Babel config (the TGSL shaders need its build-time transform) +- iOS 17+: the camera-import path relies on Metal external-texture features not guaranteed on earlier versions. The [base integration](./vision-camera.mdx) has no such requirement, so you can keep your `ios.deploymentTarget` unchanged and gate WebGPU usage at runtime. + +```bash npm2yarn +npm install react-native-webgpu typegpu unplugin-typegpu +``` + +```js title='babel.config.js' +module.exports = { + presets: ["babel-preset-expo"], + plugins: ["unplugin-typegpu/babel", "react-native-worklets/plugin"], +}; +``` + +Keep `react-native-worklets/plugin` as the last plugin. + +## Get a camera-capable GPU device + +`useCameraWebGpuDevice` returns an app-wide shared `GPUDevice`, requested with the features the camera-import path needs: + +```tsx +import { useCameraWebGpuDevice } from "@fishjam-cloud/react-native-vision-camera-source/webgpu"; +// ---cut--- +const { device, error } = useCameraWebGpuDevice(); +``` + +To use your own device instead, pass it as the `device` option of `useVisionCameraWebGpuSource`. It is validated against `getRequiredWebGpuCameraFeatures()`; a device missing any of the features surfaces a descriptive `error` instead of failing per frame. + +## Publish the camera through your own shaders + +:::tip[First time?] +The [WebGPU effects tutorial](../../../tutorials/webgpu-effects.mdx) builds this pipeline step by step in a working app, from a passthrough render pass to a watermark overlay and a color effect. +::: + +The example below publishes the camera in grayscale. To apply your own effect, replace the fragment stage. Your component only does the drawing; the hook handles publishing, GPU synchronization with the video encoder, timestamps and frame lifetimes. + +:::note +The shaders are written in [TypeGPU](https://docs.swmansion.com/TypeGPU/) (TGSL): typed TypeScript functions compiled to WGSL by `unplugin-typegpu`. TypeGPU is not required; you can hand-write WGSL and prepend the bindings' `bindingDeclarations` yourself. +::: + +```tsx +import React, { useCallback, useMemo } from "react"; +import tgpu from "typegpu"; +import * as d from "typegpu/data"; +import { dot } from "typegpu/std"; +import { + useCamera as useVisionCamera, + useCameraPermission, + type Frame, +} from "react-native-vision-camera"; +import { RTCView } from "@fishjam-cloud/react-native-client"; +import { + useVisionCameraWebGpuSource, + useCameraWebGpuDevice, + createCameraShaderBindings, + getOutputSurfaceFormat, + type WebGpuFrameRenderFunction, +} from "@fishjam-cloud/react-native-vision-camera-source/webgpu"; + +// Full-screen triangle; uv spans the visible area. +const vertexMain = tgpu.vertexFn({ + in: { vertexIndex: d.builtin.vertexIndex }, + out: { position: d.builtin.position, uv: d.location(0, d.vec2f) }, +})((input) => { + const positions = [d.vec2f(-1, -1), d.vec2f(3, -1), d.vec2f(-1, 3)]; + const p = positions[input.vertexIndex]; + return { + position: d.vec4f(p.x, p.y, 0, 1), + uv: d.vec2f((p.x + 1) * 0.5, 1 - (p.y + 1) * 0.5), + }; +}); + +export function GrayscaleCameraPublisher() { + const { hasPermission } = useCameraPermission(); + const { device } = useCameraWebGpuDevice(); + + const effect = useMemo(() => { + if (device == null) return null; + + const cameraBindings = createCameraShaderBindings(device); + const fragmentMain = tgpu.fragmentFn({ + in: { uv: d.location(0, d.vec2f) }, + out: d.vec4f, + })((input) => { + const color = cameraBindings.sampleCamera(input.uv); + const gray = dot(color.xyz, d.vec3f(0.299, 0.587, 0.114)); + return d.vec4f(gray, gray, gray, 1); + }); + + // TypeGPU cannot emit the external-texture binding itself, so prepend + // cameraBindings.bindingDeclarations to the resolved WGSL. + const module = device.createShaderModule({ + code: + cameraBindings.bindingDeclarations + + tgpu.resolve({ externals: { vertexMain, fragmentMain } }), + }); + const pipeline = device.createRenderPipeline({ + layout: device.createPipelineLayout({ + bindGroupLayouts: [cameraBindings.bindGroupLayout], + }), + vertex: { module, entryPoint: "vertexMain" }, + fragment: { + module, + entryPoint: "fragmentMain", + targets: [{ format: getOutputSurfaceFormat() }], + }, + }); + return { cameraBindings, pipeline }; + }, [device]); + + const onFrame = useCallback( + (frame: Frame, render: WebGpuFrameRenderFunction) => { + "worklet"; + if (effect == null) return; // drop frames until the pipeline is ready + render(({ commandEncoder, outputView, cameraBindGroup }) => { + const pass = commandEncoder.beginRenderPass({ + colorAttachments: [ + { view: outputView, loadOp: "clear", storeOp: "store" }, + ], + }); + pass.setPipeline(effect.pipeline); + pass.setBindGroup(0, cameraBindGroup!); + pass.draw(3); + pass.end(); + }); + }, + [effect], + ); + + const { frameOutput, stream } = useVisionCameraWebGpuSource("my-camera", { + width: 720, + height: 1280, + cameraShaderBindings: effect?.cameraBindings, + onFrame, + }); + + useVisionCamera({ + device: "front", + isActive: hasPermission, + outputs: [frameOutput], + }); + + if (!stream) return null; + return ( + + ); +} +``` + +How the example works: + +- `createCameraShaderBindings(device)` gives your shaders `sampleCamera(uv)`, which returns upright RGB on both platforms and handles the YUV decode for you. +- Everything created from the `device` (bindings, shaders, pipeline) lives in one `useMemo` keyed by the device. TypeGPU cannot emit the camera's `texture_external` binding, so `cameraBindings.bindingDeclarations` is prepended to the resolved WGSL, and the fragment targets `getOutputSurfaceFormat()` (`rgba8unorm` on Android, `bgra8unorm` on iOS). +- Passing `cameraShaderBindings` to the hook makes the render context carry a ready-made `cameraBindGroup`, rebuilt each frame because the camera's external texture expires with every frame. +- The worklet encodes one render pass; the hook submits it and synchronizes with the video encoder. `frameOutput` plugs into VisionCamera's `useCamera`; `stream` is the self-view. + +Other peers receive the feed among their [`customVideoTracks`](./index.mdx#receiving-custom-tracks). + +## Rules inside `onFrame` + +The callback you pass to `render(...)` receives a `WebGpuFrameRenderContext` with the `device`, `queue`, `commandEncoder`, the live `cameraTexture` (a `GPUExternalTexture`), the output surface (`outputTexture`, `outputView`, `outputWidth`, `outputHeight`), and camera metadata (`cameraWidth`, `cameraHeight`, `cameraIsMirrored`). + +:::warning[Rules your worklet must follow] + +- **Always draw into the provided `outputView`.** Calling `outputTexture.createView()` per frame leaks native wrappers on the frame runtime, because `GPUTextureView` has no release API. +- **Call `render(...)` at most once per frame.** Skipping it drops the frame; nothing is published for it. +- **Don't call `queue.submit()` yourself.** The hook submits your passes and synchronizes with the video encoder. +- **Finish GPU uploads before frames flow.** Helpers like [`queue.copyExternalImageToTexture`](https://developer.mozilla.org/en-US/docs/Web/API/GPUQueue/copyExternalImageToTexture) submit work internally. Running them from the JS thread while the source is active races the hook's submissions and can crash the app, so upload textures before activating the camera. +- **Camera bind groups cannot be cached across frames**, because the external texture changes every frame. The hook rebuilds `cameraBindGroup` for you; if you build your own, call `createCameraBindGroup` inside the worklet each frame. +- **Keep `onFrame`'s identity stable** (`useCallback` or module scope). + +::: + +After `render(...)` returns you may keep using the `frame` (for example, to run inference on it), but only until your callback returns; the hook releases it afterwards. + +## Going further + +- **Overlays**: a frame may contain more than one render pass. Encode additional passes into the same `outputView` (with `loadOp: "load"`) after the camera pass to draw watermarks or other content on top. +- **Cropping helpers**: the grayscale example stretches the camera to the output. `computeAspectFillCrop` and `computeSquareCrop` compute the crop that fills your output aspect ratio (like `objectFit: "cover"`); `packFrameCropParams` packs a crop for your own uniform buffers. +- **Pipelines that cannot sample `texture_external`** can resolve the camera into an owned `rgba8unorm` texture with `createCameraTextureResolver` and `resolveCameraTexture`, at the cost of one extra render pass per frame. + +The full toolkit is documented in the [Custom Video Source API reference](../../../api/custom-video-source/index.md). + +## Platform notes + +- `sampleCamera(uv)` returns upright RGB on both platforms. On **Android** it performs the BT.709 limited-range YUV→RGB decode in-shader; on **iOS** the camera already arrives as RGB. +- `getOutputSurfaceFormat()` returns the published surface format: `rgba8unorm` on Android, `bgra8unorm` on iOS. Use it for your fragment targets instead of hard-coding a format. +- The context's `cameraIsMirrored` tells you whether the camera feed is mirrored (typically the front camera). + + + + +## Related guides + +- [WebGPU effects tutorial](../../../tutorials/webgpu-effects.mdx): build this pipeline step by step in a working app +- [Custom sources on the web](./web.mdx): other ways to obtain a `MediaStream` on the web +- [Vision Camera](./vision-camera.mdx): publish the camera without custom rendering +- [Low-level frame API](./low-level-frame-api.mdx): the pooled-surface layer the React Native hook builds on +- [How custom sources work](../../../explanation/custom-sources.mdx) +- API reference: [Vision Camera Source package](../../../api/vision-camera-source/index.md), [Custom Video Source package](../../../api/custom-video-source/index.md) diff --git a/versioned_docs/version-0.26.0/how-to/client/debug-logging.mdx b/versioned_docs/version-0.29.0/how-to/client/debug-logging.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/debug-logging.mdx rename to versioned_docs/version-0.29.0/how-to/client/debug-logging.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/installation.mdx b/versioned_docs/version-0.29.0/how-to/client/installation.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/installation.mdx rename to versioned_docs/version-0.29.0/how-to/client/installation.mdx diff --git a/versioned_docs/version-0.29.0/how-to/client/ios-simulator-camera.mdx b/versioned_docs/version-0.29.0/how-to/client/ios-simulator-camera.mdx new file mode 100644 index 00000000..8c803bb8 --- /dev/null +++ b/versioned_docs/version-0.29.0/how-to/client/ios-simulator-camera.mdx @@ -0,0 +1,23 @@ +--- +sidebar_position: 17 +sidebar_label: "iOS Simulator Camera 📱" +description: Use SimCam to test camera features in the iOS Simulator without a physical device. +--- + +# iOS Simulator Camera Mobile + +The iOS Simulator has no camera, which means you normally need a physical device to test video streaming with Fishjam. + +[SimCam](https://simcam.swmansion.com/) is a macOS app that injects a virtual camera into the simulator. It works through standard AVFoundation APIs, so `@fishjam-cloud/react-native-client` picks it up without any changes to your code. + +## What SimCam provides + +- **Live camera feed**: your Mac's camera streamed into the simulator +- **Video file**: a video clip you can replay for consistent test scenarios +- **QR code**: inject QR codes without holding a phone up to the screen + +## Getting started + +1. Download and install SimCam from [simcam.swmansion.com](https://simcam.swmansion.com/). +2. Launch SimCam and pick a camera source. +3. Run your app in the simulator. The virtual camera shows up just like a real one. diff --git a/versioned_docs/version-0.26.0/how-to/client/list-other-peers.mdx b/versioned_docs/version-0.29.0/how-to/client/list-other-peers.mdx similarity index 98% rename from versioned_docs/version-0.26.0/how-to/client/list-other-peers.mdx rename to versioned_docs/version-0.29.0/how-to/client/list-other-peers.mdx index 8501184b..7aee9af0 100644 --- a/versioned_docs/version-0.26.0/how-to/client/list-other-peers.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/list-other-peers.mdx @@ -61,7 +61,7 @@ function VideoPlayer({ stream }: { stream: MediaStream | null }) { return ( ); diff --git a/versioned_docs/version-0.26.0/how-to/client/managing-devices.mdx b/versioned_docs/version-0.29.0/how-to/client/managing-devices.mdx similarity index 78% rename from versioned_docs/version-0.26.0/how-to/client/managing-devices.mdx rename to versioned_docs/version-0.29.0/how-to/client/managing-devices.mdx index 063b1f8d..38302770 100644 --- a/versioned_docs/version-0.26.0/how-to/client/managing-devices.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/managing-devices.mdx @@ -46,8 +46,8 @@ export function CameraControl() { -To select the desired camera, use the [`selectCamera`](../../api/mobile/functions/useCamera#selectcamera) method. -The list of the available camera devices is available via the [`cameraDevices`](../../api/mobile/functions/useCamera#cameradevices). +To select the desired camera, use the [`selectCamera`](../../api/mobile/functions/useCamera) method. +The list of the available camera devices is available via the [`cameraDevices`](../../api/mobile/functions/useCamera). ```tsx import React, { useCallback, useState } from "react"; @@ -77,6 +77,10 @@ export function FlipButton() { +:::tip[Testing on iOS Simulator] +The iOS Simulator has no camera. [SimCam](https://simcam.swmansion.com/) solves this by injecting a virtual feed (your Mac's camera or a video file), so you can test without a physical device. See [Camera on iOS Simulator](./ios-simulator-camera). +::: + ## Turning Camera On and Off @@ -103,7 +107,7 @@ export function CameraControl() { -You can use [`toggleCamera`](../../api/mobile/functions/useCamera#togglecamera) to toggle the camera state, or use [`startCamera`](../../api/mobile/functions/useCamera#startcamera) and [`stopCamera`](../../api/mobile/functions/useCamera#stopcamera) for more explicit control. +You can use [`toggleCamera`](../../api/mobile/functions/useCamera) to toggle the camera state, or use [`startCamera`](../../api/mobile/functions/useCamera) and [`stopCamera`](../../api/mobile/functions/useCamera) for more explicit control. #### Using toggleCamera @@ -254,6 +258,53 @@ export function MicrophoneControl() { } ``` +## Audio processing: noise cancellation and auto gain control + +When capturing a microphone, the browser (Web) or OS (Mobile) applies audio processing — **echo cancellation**, **noise suppression** (noise cancellation) and **auto gain control** — to make speech clearer. These are enabled by default and are the right choice for most voice and meeting use cases. + +Turn them off only when you need the raw, unprocessed signal — for example capturing music or an instrument, or running your own audio processing — since these filters can distort non-speech audio. + + + + +On Web, audio processing follows the browser's defaults (noise suppression, auto gain control and echo cancellation are on by default). To set them explicitly, pass [`constraints`](../../api/web/interfaces/FishjamProviderProps#constraints) to `FishjamProvider`. The `audio` field accepts standard [`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints). + +```tsx +import React from "react"; +import { FishjamProvider } from "@fishjam-cloud/react-client"; + +export function App({ fishjamId }: { fishjamId: string }) { + return ( + + {/* your app */} + + ); +} +``` + +To capture raw audio (for example, music), set `echoCancellation`, `noiseSuppression`, and `autoGainControl` to `false` instead. + +:::note +These constraints are applied when `FishjamProvider` creates the microphone track. `selectMicrophone` and `startMicrophone` reuse the same constraints — they don't accept per-call overrides. +::: + + + + +On Mobile, echo cancellation, noise suppression and auto gain control are enabled by default in the native audio pipeline and aren't currently configurable from JavaScript. + + + + ## Managing Permissions (Mobile only) The SDK provides built-in hooks for querying and requesting device permissions: `useCameraPermissions` and `useMicrophonePermissions` from `@fishjam-cloud/react-native-client`. diff --git a/versioned_docs/version-0.26.0/how-to/client/metadata.mdx b/versioned_docs/version-0.29.0/how-to/client/metadata.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/metadata.mdx rename to versioned_docs/version-0.29.0/how-to/client/metadata.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/migration-guide.mdx b/versioned_docs/version-0.29.0/how-to/client/migration-guide.mdx similarity index 98% rename from versioned_docs/version-0.26.0/how-to/client/migration-guide.mdx rename to versioned_docs/version-0.29.0/how-to/client/migration-guide.mdx index d74c42a6..57840793 100644 --- a/versioned_docs/version-0.26.0/how-to/client/migration-guide.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/migration-guide.mdx @@ -215,8 +215,8 @@ await joinRoom({ fishjamId: "your-id", peerToken }); import { useConnection, useSandbox } from "@fishjam-cloud/react-native-client"; const { joinRoom } = useConnection(); -// fishjamId is now provided through FishjamProvider -const { getSandboxPeerToken } = useSandbox(); +const sandboxApiUrl = "your-sandbox-api-url-here"; +const { getSandboxPeerToken } = useSandbox({ sandboxApiUrl }); const peerToken = await getSandboxPeerToken("roomName", "peerName"); await joinRoom({ peerToken }); // fishjamId passed through FishjamProvider diff --git a/versioned_docs/version-0.26.0/how-to/client/picture-in-picture.mdx b/versioned_docs/version-0.29.0/how-to/client/picture-in-picture.mdx similarity index 98% rename from versioned_docs/version-0.26.0/how-to/client/picture-in-picture.mdx rename to versioned_docs/version-0.29.0/how-to/client/picture-in-picture.mdx index 47b9a62d..969d3e09 100644 --- a/versioned_docs/version-0.26.0/how-to/client/picture-in-picture.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/picture-in-picture.mdx @@ -5,8 +5,8 @@ sidebar_label: "Picture in Picture 📱" description: Display video in a floating PiP window when the user backgrounds the app on Android or iOS. --- -import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; # Picture in Picture Mobile @@ -369,7 +369,7 @@ const styles = StyleSheet.create({ flex: 1, }, video: { - width: "100%", + width: 200, height: 200, }, }); @@ -450,10 +450,14 @@ import { useSandbox, } from "@fishjam-cloud/react-native-client"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; + export function LivestreamScreen() { const pipViewRef = useRef>(null); const { connect, stream } = useLivestreamViewer(); - const { getSandboxViewerToken } = useSandbox(); + const { getSandboxViewerToken } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, + }); useEffect(() => { const connectToStream = async () => { @@ -533,9 +537,13 @@ import { stopPIP, } from "@fishjam-cloud/react-native-client"; +const SANDBOX_API_URL = "your-sandbox-api-url-here"; + export function LivestreamViewerScreen() { const pipViewRef = useRef>(null); - const { getSandboxViewerToken } = useSandbox(); + const { getSandboxViewerToken } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, + }); const { connect, disconnect, stream } = useLivestreamViewer(); useEffect(() => { diff --git a/versioned_docs/version-0.26.0/how-to/client/reconnection-handling.mdx b/versioned_docs/version-0.29.0/how-to/client/reconnection-handling.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/reconnection-handling.mdx rename to versioned_docs/version-0.29.0/how-to/client/reconnection-handling.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/screensharing.mdx b/versioned_docs/version-0.29.0/how-to/client/screensharing.mdx similarity index 96% rename from versioned_docs/version-0.26.0/how-to/client/screensharing.mdx rename to versioned_docs/version-0.29.0/how-to/client/screensharing.mdx index 607ad2a6..39de39e6 100644 --- a/versioned_docs/version-0.26.0/how-to/client/screensharing.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/screensharing.mdx @@ -218,7 +218,7 @@ You can use [`useScreenShare`](../../api/mobile/functions/useScreenShare) hook t :::tip[Permissions] -Permission request is handled for you as soon as you call [`startStreaming`](../../api/mobile/functions/useScreenShare#startstreaming). +Permission request is handled for you as soon as you call [`startStreaming`](../../api/mobile/functions/useScreenShare). ::: @@ -228,8 +228,8 @@ On Android API level >= 24, you must use a foreground service when screen sharin ::: -You can enable/disable screen sharing with [`startStreaming`](../../api/mobile/functions/useScreenShare#startstreaming) and [`stopStreaming`](../../api/mobile/functions/useScreenShare#stopstreaming) methods. -And check current state by checking if [`stream`](../../api/mobile/functions/useScreenShare#stream) exists. +You can enable/disable screen sharing with [`startStreaming`](../../api/mobile/functions/useScreenShare) and [`stopStreaming`](../../api/mobile/functions/useScreenShare) methods. +And check current state by checking if [`stream`](../../api/mobile/functions/useScreenShare) exists. ```tsx import React, { useCallback } from "react"; diff --git a/versioned_docs/version-0.26.0/how-to/client/simulcast.mdx b/versioned_docs/version-0.29.0/how-to/client/simulcast.mdx similarity index 97% rename from versioned_docs/version-0.26.0/how-to/client/simulcast.mdx rename to versioned_docs/version-0.29.0/how-to/client/simulcast.mdx index 83e773db..6d253553 100644 --- a/versioned_docs/version-0.26.0/how-to/client/simulcast.mdx +++ b/versioned_docs/version-0.29.0/how-to/client/simulcast.mdx @@ -175,7 +175,12 @@ function RemoteVideos() { {remotePeers.map((peer) => peer.tracks.map((track) => ( - {track.stream && } + {track.stream && ( + + )} )), diff --git a/versioned_docs/version-0.26.0/how-to/client/start-streaming.mdx b/versioned_docs/version-0.29.0/how-to/client/start-streaming.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/start-streaming.mdx rename to versioned_docs/version-0.29.0/how-to/client/start-streaming.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/stream-middleware.mdx b/versioned_docs/version-0.29.0/how-to/client/stream-middleware.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/stream-middleware.mdx rename to versioned_docs/version-0.29.0/how-to/client/stream-middleware.mdx diff --git a/versioned_docs/version-0.26.0/how-to/client/text-chat.mdx b/versioned_docs/version-0.29.0/how-to/client/text-chat.mdx similarity index 100% rename from versioned_docs/version-0.26.0/how-to/client/text-chat.mdx rename to versioned_docs/version-0.29.0/how-to/client/text-chat.mdx diff --git a/versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-folder.png b/versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-folder.png similarity index 100% rename from versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-folder.png rename to versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-folder.png diff --git a/versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-group.png b/versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-group.png similarity index 100% rename from versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-group.png rename to versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-group.png diff --git a/versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-target.png b/versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-target.png similarity index 100% rename from versioned_docs/version-0.26.0/how-to/react-native/assets/ios-new-target.png rename to versioned_docs/version-0.29.0/how-to/react-native/assets/ios-new-target.png diff --git a/versioned_docs/version-0.26.0/index.mdx b/versioned_docs/version-0.29.0/index.mdx similarity index 98% rename from versioned_docs/version-0.26.0/index.mdx rename to versioned_docs/version-0.29.0/index.mdx index a9a27d35..84c284af 100644 --- a/versioned_docs/version-0.26.0/index.mdx +++ b/versioned_docs/version-0.29.0/index.mdx @@ -3,6 +3,7 @@ sidebar_position: 0 --- import QuickNavigation from "@site/src/components/QuickNavigation"; +import SkillCallout from "@site/src/components/SkillCallout"; import { items } from "@site/src/content/cardItems"; import { useVersionedLink } from "@site/src/hooks/useVersionedLink"; @@ -18,6 +19,8 @@ To get started, check out one of our guides or browse the examples below: + + ## Tutorials
Google - async def forward_audio_to_gemini(): - async for track_data in fishjam_session.receive(): - await gemini_session.send_realtime_input(audio=Blob( - mime_type=GeminiIntegration.GEMINI_AUDIO_MIME_TYPE, - data=track_data.data - )) - - # Google -> Fishjam - async def forward_audio_to_fishjam(): - async for msg in gemini_session.receive(): - server_content = msg.server_content - - if server_content is None: - continue - - if server_content.interrupted: - await outgoing_track.interrupt() - - if server_content.model_turn and server_content.model_turn.parts: - for part in server_content.model_turn.parts: - if part.inline_data and part.inline_data.data: - await outgoing_track.send_chunk(part.inline_data.data) - - # Run both loops concurrently - await asyncio.gather( - forward_audio_to_gemini(), - forward_audio_to_fishjam() - ) + async def run(): + async with agent.connect() as fishjam_session: + + # Use our preset to match the required audio format (24kHz) + outgoing_track = await fishjam_session.add_track(GeminiIntegration.GEMINI_OUTPUT_AUDIO_SETTINGS) + + async with gen_ai.aio.live.connect( + model=GEMINI_MODEL, + config={"response_modalities": [Modality.AUDIO]} + ) as gemini_session: + + # Fishjam -> Google + async def forward_audio_to_gemini(): + async for track_data in fishjam_session.receive(): + await gemini_session.send_realtime_input(audio=Blob( + mime_type=GeminiIntegration.GEMINI_AUDIO_MIME_TYPE, + data=track_data.data + )) + + # Google -> Fishjam + async def forward_audio_to_fishjam(): + async for msg in gemini_session.receive(): + server_content = msg.server_content + + if server_content is None: + continue + + if server_content.interrupted: + await outgoing_track.interrupt() + + if server_content.model_turn and server_content.model_turn.parts: + for part in server_content.model_turn.parts: + if part.inline_data and part.inline_data.data: + await outgoing_track.send_chunk(part.inline_data.data) + + # Run both loops concurrently + await asyncio.gather( + forward_audio_to_gemini(), + forward_audio_to_fishjam() + ) + + asyncio.run(run()) ``` + +## Troubleshooting Gemini API keys + +If your agent joins the room but silently does nothing — no audio, no transcription, and no error — the issue is often related to the Gemini API key. + +:::warning[API key errors surface asynchronously] +`createClient` is a thin synchronous wrapper around Google's `GoogleGenAI` and makes no network call, so it does **not** validate your key — an invalid or unauthorized key is not rejected when you create the client. Unless you verify it explicitly (see below), the key is first exercised when `live.connect()` opens the Live websocket, and authentication or access failures then typically surface through the Live session callbacks (`onerror` / `onclose`) rather than as a thrown exception. (Other problems, such as a malformed config, can still reject the awaited `connect()` call — keep a `try/catch` around it too.) +::: + +To catch a bad key up front, call `checkCredentials` before connecting: it makes a single network request and throws if the key is rejected, so misconfiguration fails fast instead of silently. Still implement the `onerror` and `onclose` callbacks and log the close code and reason — that is where model-specific rejections (see below) and other Live failures appear: + +```ts +import GeminiIntegration from "@fishjam-cloud/js-server-sdk/gemini"; +import { Modality, type LiveServerMessage } from "@google/genai"; + +const genAi = GeminiIntegration.createClient({ + apiKey: process.env.GOOGLE_API_KEY!, +}); +const GEMINI_MODEL = "gemini-2.5-flash-native-audio-preview-12-2025"; +const handleMessage = (msg: LiveServerMessage) => {}; + +// ---cut--- +await GeminiIntegration.checkCredentials(genAi); + +const session = await genAi.live.connect({ + model: GEMINI_MODEL, + config: { responseModalities: [Modality.AUDIO] }, + callbacks: { + onopen: () => console.log("Gemini Live connected"), + onerror: (e) => console.error("Gemini Live error:", e), + onclose: (e) => + console.error(`Gemini Live closed: code=${e.code} reason=${e.reason}`), + onmessage: handleMessage, + }, +}); +``` + +### Common reasons a key doesn't work + +- Wrong or mistyped key, or a key from the wrong Google Cloud project. +- The Gemini API is not enabled for the key's project. +- Region or country restriction — the Gemini API (or its free tier) is not available in your region. +- Model-specific rejection. The native-audio Live models (e.g. `gemini-2.5-flash-native-audio-preview-*`) can reject an otherwise-valid key: the websocket closes with code `1008` and the message _"Your API key was reported as leaked. Please use another API key."_ (even when the key is not actually leaked), or with code `1011` internal errors. A key that works for other models can still fail here. + +### How to fix + +- Verify or regenerate your key at [Google AI Studio](https://aistudio.google.com/app/apikey). +- Confirm the Gemini API is enabled for the key's project and that your region is supported. +- If you see the `1008` "leaked" message, rotate to a freshly generated key. diff --git a/versioned_docs/version-0.26.0/integrations/vapi-integration.mdx b/versioned_docs/version-0.29.0/integrations/vapi-integration.mdx similarity index 99% rename from versioned_docs/version-0.26.0/integrations/vapi-integration.mdx rename to versioned_docs/version-0.29.0/integrations/vapi-integration.mdx index 397bed25..c8684887 100644 --- a/versioned_docs/version-0.26.0/integrations/vapi-integration.mdx +++ b/versioned_docs/version-0.29.0/integrations/vapi-integration.mdx @@ -50,7 +50,7 @@ You will need: ```bash - pip install fishjam-server-sdk vapi + pip install fishjam-server-sdk vapi_server_sdk ``` diff --git a/versioned_docs/version-0.26.0/tutorials/_category_.json b/versioned_docs/version-0.29.0/tutorials/_category_.json similarity index 100% rename from versioned_docs/version-0.26.0/tutorials/_category_.json rename to versioned_docs/version-0.29.0/tutorials/_category_.json diff --git a/versioned_docs/version-0.26.0/tutorials/agents.mdx b/versioned_docs/version-0.29.0/tutorials/agents.mdx similarity index 84% rename from versioned_docs/version-0.26.0/tutorials/agents.mdx rename to versioned_docs/version-0.29.0/tutorials/agents.mdx index aa751d6f..9087dc0a 100644 --- a/versioned_docs/version-0.26.0/tutorials/agents.mdx +++ b/versioned_docs/version-0.29.0/tutorials/agents.mdx @@ -108,19 +108,23 @@ However, it's likely that in your scenario you'll want to use the [Selective Sub ```python - from fishjam import FishjamClient - from fishjam.agent import AgentResponseTrackData + import asyncio + from fishjam import FishjamClient, AgentOptions + from fishjam.agent import IncomingTrackData fishjam_client = FishjamClient(fishjam_id, management_token) agent_options = AgentOptions(subscribe_mode="auto") - agent = fishjam_client.create_agent(room_id) + agent = fishjam_client.create_agent(room_id, agent_options) - # the agent will disconnect once you exit the context - async with agent.connect() as session: - async for track_data in session.receive(): - # process the incoming data - pass + async def run(): + # the agent will disconnect once you exit the context + async with agent.connect() as session: + async for track_data in session.receive(): + # process the incoming data + pass + + asyncio.run(run()) ``` @@ -239,28 +243,33 @@ You can interrupt the currently played audio chunk. See the example below. ```python - from fishjam import FishjamClient - from fishjam.agent import AgentResponseTrackData, OutgoingAudioTrackOptions, TrackEncoding + import asyncio + from fishjam import FishjamClient, AgentOptions + from fishjam.agent import OutgoingAudioTrackOptions + from fishjam.events import TrackEncoding fishjam_client = FishjamClient(fishjam_id, management_token) agent_options = AgentOptions(subscribe_mode="auto") - agent = fishjam_client.create_agent(room_id) + agent = fishjam_client.create_agent(room_id, agent_options) + + track_options = OutgoingAudioTrackOptions(encoding=TrackEncoding.TRACK_ENCODING_PCM16) - track_options = OutgoingAudioTrackOptions(encoding=TrackEncoding.PCM16) + async def run(): + # the agent will disconnect once you exit the context + async with agent.connect() as session: + outgoing_track = await session.add_track(track_options) - # the agent will disconnect once you exit the context - async with agent.connect() as session: - outgoing_track = session.create_track(track_options) + # that's a dummy chatbot + async for chatbot_data in chatbot.receive(): + await outgoing_track.send_chunk(chatbot_data) - # that's a dummy chatbot - async for chatbot_data in chatbot.receive(): - outgoing_track.send_chunk(chatbot_data) + # you're able to interrupt the currently played audio chunk + # [!code highlight:1] + await outgoing_track.interrupt() - # you're able to interrupt the currently played audio chunk - # [!code highlight:1] - ongoing_track.interrupt() + asyncio.run(run()) ``` @@ -321,18 +330,21 @@ Video frame capture is rate-limited to one frame per second per track. agent = fishjam_client.create_agent(room_id) - async with agent.connect() as session: - # Request a frame - # [!code highlight:1] - await session.capture_image(track_id) - - # Captured frames arrive as IncomingTrackImage messages - async for message in session.receive(): - match message: - case IncomingTrackImage() as msg if msg.track_id == track_id: - data = msg.data - # process the image data - pass + async def run(): + async with agent.connect() as session: + # Request a frame + # [!code highlight:1] + await session.capture_image(track_id) + + # Captured frames arrive as IncomingTrackImage messages + async for message in session.receive(): + match message: + case IncomingTrackImage() as msg if msg.track_id == track_id: + data = msg.data + # process the image data + pass + + asyncio.run(run()) ``` @@ -365,9 +377,14 @@ After you're done using an agent, you can disconnect it from the room. ```python - # the agent will disconnect once you exit the context - async with agent.connect() as session: - pass + import asyncio + + async def run(): + # the agent will disconnect once you exit the context + async with agent.connect() as session: + pass + + asyncio.run(run()) ``` diff --git a/versioned_docs/version-0.26.0/tutorials/backend-quick-start.mdx b/versioned_docs/version-0.29.0/tutorials/backend-quick-start.mdx similarity index 99% rename from versioned_docs/version-0.26.0/tutorials/backend-quick-start.mdx rename to versioned_docs/version-0.29.0/tutorials/backend-quick-start.mdx index 0c423d2b..d684afdd 100644 --- a/versioned_docs/version-0.26.0/tutorials/backend-quick-start.mdx +++ b/versioned_docs/version-0.29.0/tutorials/backend-quick-start.mdx @@ -39,7 +39,6 @@ A simple backend server that can create rooms, add peers, and generate tokens fo - How to install and set up a Fishjam server SDK - How to create and manage rooms - How to create peers and generate tokens -- How to listen for Fishjam events ## Prerequisites @@ -354,6 +353,7 @@ Build a simple HTTP endpoint that your client apps can call: ```python import os from fastapi import FastAPI, HTTPException + from pydantic import BaseModel from fishjam import FishjamClient, PeerOptions app = FastAPI() @@ -562,7 +562,7 @@ Here's a complete working backend: Now that you have a working backend, explore these guides: - [How to set up a production deployment](../how-to/backend/production-deployment) -- [How to handle webhooks and events](../how-to/backend/server-setup) +- [How to handle webhooks and events](../how-to/backend/server-setup#webhooks) - [How to implement a FastAPI backend](../how-to/backend/fastapi-example) - [How to implement a Fastify backend](../how-to/backend/fastify-example) diff --git a/versioned_docs/version-0.26.0/tutorials/livestreaming.mdx b/versioned_docs/version-0.29.0/tutorials/livestreaming.mdx similarity index 89% rename from versioned_docs/version-0.26.0/tutorials/livestreaming.mdx rename to versioned_docs/version-0.29.0/tutorials/livestreaming.mdx index b00a9388..09ccc9d8 100644 --- a/versioned_docs/version-0.26.0/tutorials/livestreaming.mdx +++ b/versioned_docs/version-0.29.0/tutorials/livestreaming.mdx @@ -5,8 +5,8 @@ title: Livestreaming description: Set up livestreaming with Fishjam, from sandbox prototyping to production deployment with server SDKs. --- -import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; # Livestreaming with Fishjam @@ -32,6 +32,7 @@ See [Audio-only calls](../how-to/backend/audio-only-calls) for more information. If you don't have a backend server setup, you can still prototype a livestreaming use-case with the Sandbox API. If you want to start by setting up your backend, then you can start by reading [Production Livestreaming with Server SDKs](#production-livestreaming-with-server-sdks). +For React/React Native apps, copy both the Fishjam ID from the [Dashboard tab](https://fishjam.io/app) and the Sandbox API URL from the [Sandbox tab](https://fishjam.io/app/sandbox): the Sandbox API URL allows to generate test peer tokens, while the Fishjam ID is passed to `FishjamProvider` for media server access. ### Streamer setup @@ -47,7 +48,8 @@ The easiest way to obtain a sandbox streamer token is by using the Sandbox API i ```tsx import { useSandbox } from '@fishjam-cloud/react-client'; - const { getSandboxLivestream } = useSandbox(); + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; + const { getSandboxLivestream } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const { streamerToken, room: { id: roomId }, @@ -64,7 +66,8 @@ The easiest way to obtain a sandbox streamer token is by using the Sandbox API i // ---cut--- import { useSandbox } from '@fishjam-cloud/react-native-client'; - const { getSandboxLivestream } = useSandbox(); + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; + const { getSandboxLivestream } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const { streamerToken } = await getSandboxLivestream('example-room'); ``` @@ -163,9 +166,10 @@ We can now start sending media, which we can obtain from the user's camera, scre } from '@fishjam-cloud/react-native-client'; const roomName = 'my-room'; + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; // Inside your component: - const { getSandboxLivestream } = useSandbox(); + const { getSandboxLivestream } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const { connect } = useLivestreamStreamer(); const { cameraStream } = useCamera(); const { microphoneStream } = useMicrophone(); @@ -205,7 +209,7 @@ We can now start sending media, which we can obtain from the user's camera, scre If you want to continue screen sharing when the app goes to the background, you need to: 1. Enable VoIP background mode by setting `enableVoIPBackgroundMode: true` in the plugin configuration or adding the VoIP background mode to your `Info.plist` - 2. Use the [`useCallKitService`](../../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session + 2. Use the [`useCallKitService`](../api/mobile/functions/useCallKitService) hook in your component to manage the CallKit session See the [background calls documentation](../how-to/client/background-streaming) for detailed instructions and code examples. @@ -223,10 +227,11 @@ We can now start sending media, which we can obtain from the user's camera, scre } from '@fishjam-cloud/react-native-client'; const roomName = 'my-room'; + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; // Inside your component: const { initializeDevices } = useInitializeDevices(); - const { getSandboxLivestream } = useSandbox(); + const { getSandboxLivestream } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const { connect } = useLivestreamStreamer(); const { startStreaming: startScreenCapture, @@ -289,7 +294,8 @@ We obtain a sandbox viewer token using the Sandbox API in the client SDKs: ```tsx import { useSandbox } from '@fishjam-cloud/react-client'; - const { getSandboxViewerToken } = useSandbox(); + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; + const { getSandboxViewerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const viewerToken = await getSandboxViewerToken('example-room'); ``` @@ -305,7 +311,8 @@ We obtain a sandbox viewer token using the Sandbox API in the client SDKs: // ---cut--- import { useSandbox } from '@fishjam-cloud/react-native-client'; - const { getSandboxViewerToken } = useSandbox(); + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; + const { getSandboxViewerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const viewerToken = await getSandboxViewerToken('example-room'); ``` @@ -345,9 +352,10 @@ We can now begin receiving the stream } from '@fishjam-cloud/react-native-client'; const roomName = 'my-room'; + const SANDBOX_API_URL = 'your-sandbox-api-url-here'; // Inside your component: - const { getSandboxViewerToken } = useSandbox(); + const { getSandboxViewerToken } = useSandbox({ sandboxApiUrl: SANDBOX_API_URL }); const { connect, stream } = useLivestreamViewer(); const token = await getSandboxViewerToken(roomName); @@ -421,15 +429,15 @@ Our backend needs to do three things to be ready for streaming: ```python - from fishjam import FishjamClient + from fishjam import FishjamClient, RoomOptions fishjam_client = FishjamClient( fishjam_id=fishjam_id, management_token=management_token, - ); + ) # 1. - room = fishjam_client.create_room(room_type="livestream") + room = fishjam_client.create_room(RoomOptions(room_type="livestream")) # 2. streamer_token = fishjam_client.create_livestream_streamer_token(room.id) # 3. diff --git a/versioned_docs/version-0.29.0/tutorials/moq/_category_.json b/versioned_docs/version-0.29.0/tutorials/moq/_category_.json new file mode 100644 index 00000000..fb366c7c --- /dev/null +++ b/versioned_docs/version-0.29.0/tutorials/moq/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Media over QUIC (MoQ)", + "position": 7, + "collapsed": false, + "link": { + "type": "doc", + "id": "tutorials/moq/index" + } +} diff --git a/versioned_docs/version-0.29.0/tutorials/moq/index.mdx b/versioned_docs/version-0.29.0/tutorials/moq/index.mdx new file mode 100644 index 00000000..2308eb6a --- /dev/null +++ b/versioned_docs/version-0.29.0/tutorials/moq/index.mdx @@ -0,0 +1,17 @@ +--- +type: tutorial +title: Media over QUIC (MoQ) +description: Step-by-step guides for publishing and subscribing to live broadcasts over Media over QUIC (MoQ) with Fishjam, on both web and React Native. +--- + +import DocCardList from "@theme/DocCardList"; + +# Media over QUIC (MoQ) + +Step-by-step guides for publishing and subscribing to live broadcasts over [Media over QUIC (MoQ)](https://datatracker.ietf.org/wg/moq/about/) with Fishjam. For the big-picture overview of how MoQ fits into Fishjam, see [Media over QUIC in Fishjam](../../explanation/moq-with-fishjam.mdx). + +:::warning[MoQ is a standalone feature] +MoQ runs as a **separate delivery path** in Fishjam — it handles publishing and subscribing to a live broadcast over the MoQ relay, and the rest of Fishjam's feature set does not apply to a MoQ stream. In particular, a MoQ broadcast is not part of a WebRTC [room](../../explanation/rooms.mdx), so you cannot use features like [Agents](../agents.mdx), [data channels](../../explanation/data-channels.mdx), and others that are part of the Fishjam WebRTC ecosystem. +::: + + diff --git a/versioned_docs/version-0.29.0/tutorials/moq/react-native-publishing.mdx b/versioned_docs/version-0.29.0/tutorials/moq/react-native-publishing.mdx new file mode 100644 index 00000000..a1616fc5 --- /dev/null +++ b/versioned_docs/version-0.29.0/tutorials/moq/react-native-publishing.mdx @@ -0,0 +1,224 @@ +--- +type: tutorial +sidebar_position: 3 +title: React Native Publishing +description: Publish a live video and audio broadcast over Media over QUIC (MoQ) from a React Native mobile app with Fishjam, from sandbox prototyping to production. +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# React Native Publishing + +This tutorial explains how to **publish** a live stream from a **React Native mobile app** using [Media over QUIC (MoQ)](https://datatracker.ietf.org/wg/moq/about/) with Fishjam. To watch a stream instead, see [React Native Subscribing](./react-native-subscribing). + +It uses [`react-native-moq`](https://github.com/software-mansion-labs/react-native-moq) — React Native bindings for MoQKit, with a small, reactive hooks-based API. For the web equivalent, see [Web Publishing](./web-publishing). + +:::info +If you're new to MoQ, then we recommend getting familiar with the [MoQ with Fishjam](../../explanation/moq-with-fishjam) explanation. +::: + +## Requirements + +`react-native-moq` targets the React Native **New Architecture** (Fabric / TurboModules): + +- iOS 16+ +- Android API 30+ + +## Installation + +```bash npm2yarn +npm install react-native-moq +``` + +Then install the iOS pods: + +```sh +cd ios && pod install +``` + +Publishing captures the camera and microphone, so the host app is responsible for runtime permissions: request `CAMERA` / `RECORD_AUDIO` on Android, and add `NSCameraUsageDescription` / `NSMicrophoneUsageDescription` to `Info.plist` on iOS. The library does not request these for you. + +:::tip +MoQ is a protocol with a well-defined negotiation, so a publisher and a subscriber don't need to use the same client library. A React Native app published with `react-native-moq` can be watched in the browser with [`@moq/watch`](./web-subscribing#connecting-and-subscribing), and vice versa. +::: + +## Quickstart with the Sandbox API + +If you don't have a backend server set up, you can prototype publishing using the [Sandbox API](../../explanation/sandbox-api-concept). + +### Obtaining a publisher connection URL + +For more on what the Sandbox API is and its limitations, see [What is the Sandbox API?](../../explanation/sandbox-api-concept). + +:::info +To obtain a MoQ connection URL you'll need your Sandbox API URL. If you don't have it already, see [Sandbox API URL](../../explanation/sandbox-api-concept#sandbox-api-url-and-fishjam-id). +::: + + + + + The `useSandbox` hook from `@fishjam-cloud/react-native-client` wraps the Sandbox API request for you: + + ```tsx + // @noErrors + import { useSandbox } from "@fishjam-cloud/react-native-client"; + + const PUBLISHER_PATH = "stream-alice"; + const SANDBOX_API_URL = "YOUR_SANDBOX_API_URL"; + + // Inside a React component: + const { getSandboxMoqPublisherAccess } = useSandbox({ + sandboxApiUrl: SANDBOX_API_URL, + }); + + // Request a publisher connection URL scoped to the publisher path + const { connection_url: publishUrl } = await getSandboxMoqPublisherAccess(PUBLISHER_PATH); + ``` + + + + + + If you don't want to pull in the whole client library just for the `useSandbox` hook, you can call the Sandbox API directly with `fetch`: + + ```ts + // @noErrors + const PUBLISHER_PATH = "stream-alice"; + const SANDBOX_API_URL = "YOUR_SANDBOX_API_URL"; + + const response = await fetch( + `${SANDBOX_API_URL}/moq/${PUBLISHER_PATH}/publisher`, + ); + const { connection_url: publishUrl } = await response.json(); + ``` + + + + +### Connecting and publishing + +`react-native-moq` is hooks-based. You open a session against the relay, capture the camera and microphone, and hand them to a publisher. + +Open the session with the publisher connection URL, capture the camera and microphone, and publish the tracks: + +```tsx +// @noErrors +import { useEffect } from "react"; +import { Button, PermissionsAndroid, Platform } from "react-native"; +import { + PublisherView, + useCamera, + useMicrophone, + usePublisher, + useSession, +} from "react-native-moq"; + +const PUBLISHER_PATH = "stream-alice"; +const publishUrl = ""; // from the step above + +function PublishScreen() { + // Open the MoQ session against the Fishjam relay using the publisher connection URL + const session = useSession(publishUrl, (s) => s.connect()); + const camera = useCamera({ position: "front" }); + const microphone = useMicrophone(); + const publisher = usePublisher(session); + + // Request camera + mic permissions on Android (iOS handles it automatically when Info.plist is configured) + useEffect(() => { + if (Platform.OS === "android") { + PermissionsAndroid.requestMultiple([ + PermissionsAndroid.PERMISSIONS.CAMERA, + PermissionsAndroid.PERMISSIONS.RECORD_AUDIO, + ]); + } + }, []); + + const isPublishing = publisher.state === "publishing"; + + return ( + <> + +