Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion api/fishjam-server
2 changes: 1 addition & 1 deletion api/room-manager
7 changes: 2 additions & 5 deletions docs/explanation/sandbox-api-concept.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ The Sandbox API mitigates this issue and allows you to start frontend developmen
The Sandbox API is essentially a simplified application built using the Fishjam Server SDKs:

```typescript
import {
FishjamClient,
RoomConfigRoomTypeEnum,
} from "@fishjam-cloud/js-server-sdk";
import { FishjamClient, RoomType } from "@fishjam-cloud/js-server-sdk";
import express from "express";
const fishjamId = "";
const managementToken = "";
Expand All @@ -53,7 +50,7 @@ app.get("/", async (req: express.Request, res: express.Response) => {

// Create or get room
const room = await fishjamClient.createRoom({
roomType: roomType as RoomConfigRoomTypeEnum,
roomType: roomType as RoomType,
});

// Create or get peer
Expand Down
66 changes: 66 additions & 0 deletions docs/how-to/react/debug-logging.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
sidebar_position: 9
---

# Debug logging

The Fishjam SDK includes a built-in debugging mode to help developers troubleshoot connectivity and media issues during development. This feature controls the verbosity of the SDK's internal logging mechanisms.

## Overview

By default, the SDK suppresses internal logs to keep your browser console clean in production environments. Enabling `debug` mode allows the SDK to output warnings and errors to the console, prefixed with `[FISHJAM]`.

## Usage

To enable debugging in a React application, pass the `debug` prop to the `FishjamProvider`.

```tsx
import React from "react";
const App = () => null;
// ---cut---
import { FishjamProvider } from "@fishjam-cloud/react-client";

function Root() {
return (
<FishjamProvider
fishjamId="your-fishjam-id"
debug // Enable debug logs
>
<App />
</FishjamProvider>
);
}
```

We recommend toggling this based on your environment variables:

```tsx
import React from "react";
import { FishjamProvider } from "@fishjam-cloud/react-client";
const process = {
env: { NODE_ENV: "development", FISHJAM_ID: "your-fishjam-id" },
};
const App = () => null;
// ---cut---
<FishjamProvider
fishjamId={process.env.FISHJAM_ID}
debug={process.env.NODE_ENV === "development"}
>
<App />
</FishjamProvider>;
```

## Behavior

- **Enabled (`true`):** The SDK will log internal warnings (e.g., permission errors, socket closures, signaling issues) and errors to the browser console. All logs are prefixed with `[FISHJAM]` for easy filtering.
- **Disabled (`false` or `undefined`):** The SDK operates silently, suppressing internal `console.warn` and `console.error` calls to prevent console pollution.

### Example Output

When enabled, you may see logs similar to:

```text
[FISHJAM] Socket closed with reason: ...
[FISHJAM] Couldn't get camera permission: NotAllowedError ...
[FISHJAM] ICE connection: disconnected
```
16 changes: 3 additions & 13 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function injectTypeDocSidebar(
version: SidebarItemsGeneratorVersion,
items: NormalizedSidebar,
): NormalizedSidebar {
const docs_without_python_reference = ["0.20.0", "0.21.0", "0.22.0"];
const docs_without_python_reference = ["0.22.0"];

const exclude_python = docs_without_python_reference.includes(
version.versionName,
Expand Down Expand Up @@ -107,18 +107,8 @@ function injectTypeDocSidebar(
label: "Server SDK for Python",
items: [
{
type: "category",
label: "fishjam",
link: {
type: "doc",
id: "api/server-python/fishjam",
},
items: [
{
type: "autogenerated",
dirName: "api/server-python/fishjam",
},
],
type: "autogenerated",
dirName: "api/server-python",
},
],
});
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile-client-sdk
2 changes: 1 addition & 1 deletion packages/web-client-sdk
Submodule web-client-sdk updated 42 files
+33 −0 .cspell.json
+3 −0 .github/workflows/node.yaml
+6 −5 .github/workflows/tests.yaml
+0 −29 e2e-tests/react-client/docker-compose-test.yaml
+2 −2 e2e-tests/react-client/playwright.config.ts
+9 −4 e2e-tests/react-client/scenarios/utils.ts
+0 −24 e2e-tests/react-client/setup/setupFishjam.ts
+7 −0 e2e-tests/setup/Caddyfile
+48 −0 e2e-tests/setup/compose.yaml
+9 −0 e2e-tests/setup/config.ts
+0 −0 e2e-tests/setup/globalSetupState.ts
+5 −0 e2e-tests/setup/package.json
+3 −1 e2e-tests/setup/setupFishjam.ts
+0 −0 e2e-tests/setup/teardownFishjam.ts
+17 −0 e2e-tests/setup/tsconfig.json
+0 −30 e2e-tests/webrtc-client/docker-compose-test.yaml
+2 −2 e2e-tests/webrtc-client/playwright.config.ts
+8 −3 e2e-tests/webrtc-client/scenarios/utils.ts
+0 −9 e2e-tests/webrtc-client/setup/globalSetupState.ts
+0 −5 e2e-tests/webrtc-client/setup/teardownFishjam.ts
+2 −2 e2e-tests/webrtc-client/src/App.tsx
+1 −1 examples/react-client/minimal-react/src/main.tsx
+5 −2 package.json
+1 −1 packages/protobufs/fishjam/agent_notifications.ts
+3 −3 packages/protobufs/fishjam/media_events/peer/peer.ts
+2 −2 packages/protobufs/fishjam/media_events/server/server.ts
+1 −1 packages/protobufs/fishjam/media_events/shared.ts
+1 −1 packages/protobufs/fishjam/notifications/shared.ts
+2 −2 packages/protobufs/fishjam/peer_notifications.ts
+3 −3 packages/protobufs/fishjam/server_notifications.ts
+1 −1 packages/protobufs/protos
+1 −1 packages/react-client/package.json
+8 −0 packages/react-client/src/hooks/devices/useCamera.ts
+4 −0 packages/react-client/src/hooks/devices/useMicrophone.ts
+2 −0 packages/react-client/src/hooks/internal/useTrackManager.ts
+1 −1 packages/react-client/src/hooks/useLivestreamStreamer.ts
+2 −0 packages/react-client/src/types/internal.ts
+1 −1 packages/ts-client/package.json
+1 −1 packages/ts-client/src/types.ts
+1 −1 packages/webrtc-client/package.json
+112 −0 spelling.txt
+894 −5 yarn.lock
12 changes: 0 additions & 12 deletions versioned_docs/version-0.20.0/api/_category_.json

This file was deleted.

31 changes: 0 additions & 31 deletions versioned_docs/version-0.20.0/api/mobile/functions/FishjamRoom.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

90 changes: 0 additions & 90 deletions versioned_docs/version-0.20.0/api/mobile/functions/useCamera.md

This file was deleted.

Loading