Skip to content

Commit 46e2dd1

Browse files
authored
[FCE-1172][FCE-1171] Add links to Room Manager (and clarify various things) (#90)
## Description Update various parts of documentation to make Room Manager usage easier to understand.
1 parent 57019ad commit 46e2dd1

File tree

7 files changed

+60
-54
lines changed

7 files changed

+60
-54
lines changed

docs/glossary.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,28 @@ A brief walk-through of the terms we use in the documentation.
88

99
### Room
1010

11-
Collection of peers that can send and receive video/audio to and from other peers
11+
A collection of peers that can send and receive video/audio to and from other peers.
1212

1313
### Peer
1414

15-
User that is connected to a room. Each peer has some associated metadata and tracks.
15+
A user that is connected to a room. Each peer has some associated metadata and tracks.
1616

1717
### Track
1818

19-
Single stream of video or audio of a peer. It could be a camera view, shared screen or microphone audio. Each peer can
20-
stream multiple tracks.
19+
A single stream of video or audio from a peer. It could be a camera view, shared screen, or microphone audio. Each peer can stream multiple tracks.
2120

2221
### Management Token
2322

24-
Secret token that should be stored on your backend. It allows to create rooms and add peers.
23+
A secret token that should be stored on your backend. It allows you to create rooms and add peers.
2524

2625
### Peer Token
2726

28-
Token that your backend should pass to end clients to allow access to a specific room.
27+
A token that your backend should pass to end clients to allow access to a specific room.
2928

3029
### Fishjam URL
3130

32-
URL to your Fishjam instance. It is used by your backend server to add peers to rooms (and create rooms).
33-
It is also
34-
used by end client apps to join rooms.
31+
The URL to your Fishjam instance. It is used by your backend server to add peers to rooms (and create rooms). It is also used by end client apps to join rooms.
3532

3633
### Room Manager
3734

38-
Our test app available **only** on Sandbox environment. It allows to test Fishjam without need to add create rooms
39-
functionality on your backend.
35+
Our test app is available **only** in the Sandbox environment. It allows you to test Fishjam without needing to add room creation functionality to your backend. You can find more details [here](/room-manager).

docs/introduction.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ import { items } from "@site/src/content/cardItems";
77

88
# Introduction
99

10-
Welcome to Fishjam documentation!
10+
Welcome to the Fishjam documentation!
1111
Here you will find everything you need to start building your multimedia streaming applications using Fishjam.
1212

1313
## What is Fishjam?
1414

1515
Fishjam is a multimedia streaming toolkit that allows you to build real-time video and audio streaming applications using [WebRTC](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API).
16-
We provide the infrastructure, media server and client SDKs so you can focus on building your apps.
16+
We provide the infrastructure, media server, and client SDKs so you can focus on building your apps.
1717

1818
**No WebRTC knowledge is required!**
1919

2020
## How can I try it out?
2121

2222
1. To get started with Fishjam, you need to create an account on our [developer panel](https://fishjam.io/app).
23-
2. Once you have an account, Fishjam will assign you a sandbox instance automatically. Sandbox instances come with [**Room Manager**](/room-manager.md) - a simple backend for creating test rooms. Copy the _Fishjam URL_ and _Management Token_ from the developer panel.
23+
2. Once you have an account, Fishjam will assign you a Sandbox instance automatically. Sandbox instances come with [**Room Manager**](/room-manager.md) - a simple backend for creating test rooms. Copy the Room Manager URL from the developer panel.
2424
3. Pick a client SDK that you want to use and follow the Quick Start guide. We provide SDKs for [React Native](/react-native/quick-setup.mdx) and [React](/react/installation.mdx).
2525

2626
<QuickNavigation
@@ -32,9 +32,9 @@ We provide the infrastructure, media server and client SDKs so you can focus on
3232
We are maintaining a simple video conferencing app called [Videoroom](https://room.fishjam.io/).
3333
It is a publicly accessible app where you can see Fishjam in action.
3434

35-
You can access it at [room.fishjam.io](https://room.fishjam.io/) - just pick a room name and peer name and you can start a video call between any two devices.
35+
You can access it at [room.fishjam.io](https://room.fishjam.io/) - just pick a room name and peer name, and you can start a video call between any two devices.
3636

37-
## Any examples I can run locally?
37+
## Are there any examples I can run locally?
3838

3939
Yes! You can find examples in our GitHub repositories that you can run locally. Examples are usually available under the `examples` directory in the relevant repository.
4040

docs/react-native/connecting.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ This article will guide you through the process of connecting to a Fishjam room.
1111

1212
## Getting URL and token
1313

14-
In order to connect, you need to retrieve `FISHJAM_URL` (multimedia server address) and `PEER_TOKEN` (token that will authenticate the peer in
14+
In order to connect, you need to retrieve the **Fishjam URL** and **Peer Token** (the token that will authenticate the peer in
1515
your Room).
1616

1717
<Tabs groupId="app-type">
1818

1919
<TabItem value="sandbox" label="Sandbox App">
2020

21-
Once you get your account on [Fishjam](https://fishjam.io), you will have access to Sandbox App. This app comes
22-
with pre-configured test service called Room Manager. This is basically service that will create Room, add your app as
23-
Room's Peer and return token required to use that Room.
21+
Once you get your account on [Fishjam](https://fishjam.io), you will have access to the Sandbox App. This app comes
22+
with a pre-configured test service called [Room Manager](/room-manager). This is basically a service that will create a Room, add your app as
23+
the Room's Peer, and return the token required to use that Room.
2424

25-
To use that simply call `fetch`:
25+
To use that, simply call `fetch`:
2626

2727
```ts
2828
const response = await fetch(
29-
`https://fishjam.io/api/v1/connect/${YOUR_ID}/room-manager/?roomName=${roomName}&peerName=${peerName}`,
29+
`https://fishjam.io/api/v1/connect/${SANDBOX_APP_UUID}/room-manager/?roomName=${roomName}&peerName=${peerName}`,
3030
);
3131

3232
const { fishjamUrl, peerToken } = await response.json();
@@ -35,22 +35,22 @@ const { fishjamUrl, peerToken } = await response.json();
3535
</TabItem>
3636
<TabItem value="production" label="Production App">
3737

38-
For production app, you need to implement your own backend service that will provide user with `PEER_TOKEN`. To do that,
38+
For the production app, you need to implement your own backend service that will provide the user with a **Peer Token**. To do that,
3939
follow our [server setup instructions](/production/server).
4040

4141
</TabItem>
4242
</Tabs>
4343

4444
## Connecting
4545

46-
In order to connect, call [`joinRoom`](/api/mobile/functions/useConnection#joinroom) method with data from previous step:
46+
In order to connect, call [`joinRoom`](/api/mobile/functions/useConnection#joinroom) method with data from the previous step:
4747

4848
```tsx
4949
import { useCallback } from "react";
5050
import { Button } from "react-native";
5151
import { useConnection } from "@fishjam-cloud/react-native-client";
5252

53-
// check https://cloud.fishjam.work/app/ for your app ID
53+
// Check https://cloud.fishjam.work/app/ for your app ID
5454
const YOUR_APP_ID = "...";
5555

5656
export function JoinRoomButton() {
@@ -68,7 +68,7 @@ export function JoinRoomButton() {
6868
}
6969

7070
async function getRoomDetails(roomName: string, peerName: string) {
71-
// this will work ONLY for sandbox app
71+
// This will work ONLY for the Sandbox App
7272
const response = await fetch(
7373
`https://fishjam.io/api/v1/connect/${YOUR_APP_ID}/room-manager/?roomName=${roomName}&peerName=${peerName}`,
7474
);

docs/react-native/installation.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ConfigurePermissions from "./_components/configure-permissions.mdx";
99

1010
# Installation
1111

12-
## Optional: Create new App
12+
## Optional: Create a New App
1313

1414
<details>
1515
<summary>Follow these steps to create a new mobile app</summary>
@@ -20,25 +20,29 @@ If you don't have an existing project, you can create a new Expo app using a tem
2020
npx create-expo-app@latest my-video-app
2121
```
2222

23-
As the next step, you have to generate native files with `expo prebuild` command:
23+
As the next step, you have to generate native files with the `expo prebuild` command:
2424

2525
```bash
2626
npx expo prebuild
2727
```
2828

29-
You can also follow more detailed [expo instructions](https://docs.expo.dev/get-started/introduction/).
29+
You can also follow more detailed [Expo instructions](https://docs.expo.dev/get-started/introduction/).
3030

3131
</details>
3232

33-
## Step 1: Install the package
33+
## Step 1: Install the Package
34+
35+
Install `@fishjam-cloud/react-native-client` with your preferred package manager.
3436

3537
<InstallPackage />
3638

37-
## Step 2: Configure App permissions
39+
## Step 2: Configure App Permissions
3840

3941
<ConfigurePermissions />
4042

41-
## Step 3: Request app permissions
43+
## Step 3: Request App Permissions
44+
45+
Before using the camera or microphone, ask the user for permissions.
4246

4347
```tsx
4448
import { useCameraPermissions } from "expo-camera";

docs/react-native/quick-setup.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import ConfigurePermissions from "./_components/configure-permissions.mdx";
88
# Quick Setup
99

1010
This article is a fast track to integrate Fishjam into your React Native application.
11-
It contains all required steps to start streaming video with Fishjam.
11+
It contains all the required steps to start streaming video with Fishjam.
1212
You can also [see a full example](#full-example) at the end of the article.
1313

1414
## Prerequisites
1515

16-
In this part, let's focus on all the things you need to prepare to use Fishjam in your project.
16+
In this part, let's focus on everything you need to prepare to use Fishjam in your project.
1717

1818
### 1. Install the package
1919

@@ -31,16 +31,16 @@ npx expo prebuild
3131

3232
### 4. Get Room Manager URL
3333

34-
Login to [Fishjam Dashboard](https://fishjam.io/app) and get your [Room Manager](/glossary#room-manager) URL.
34+
Log in to [Fishjam Dashboard](https://fishjam.io/app) and get your [Room Manager](/room-manager) URL.
3535

36-
## Step by step instructions
36+
## Step-by-step instructions
3737

3838
Now you are good to jump right into your IDE and integrate Fishjam into your app.
39-
In few simple steps, you will be able to implement a simple video call functionality.
39+
In a few simple steps, you will be able to implement a simple video call functionality.
4040

4141
### 1. Fetch peer token
4242

43-
Use your room manager URL to fetch peer token to get a new room:
43+
Use your Room Manager URL to fetch a peer token to get a new room:
4444

4545
```ts
4646
const response = await fetch(
@@ -61,7 +61,7 @@ If you want to use the camera, you must first request permission. Check
6161

6262
:::important
6363

64-
Keep in mind that this won't work on iOS Simulator, as Simulator can't access the camera.
64+
Keep in mind that this won't work on the iOS Simulator, as the Simulator can't access the camera.
6565

6666
:::
6767

@@ -103,7 +103,7 @@ export function StartStreamingButton({
103103

104104
### 3. Check if you are connected
105105

106-
Once you are connected, you can check connection status with [`useConnection`](/api/mobile/functions/useConnection) hook
106+
Once you are connected, you can check the connection status with [`useConnection`](/api/mobile/functions/useConnection) hook
107107

108108
```ts
109109
const { peerStatus } = useConnection();
@@ -154,7 +154,7 @@ Here is how it all could work together:
154154

155155
:::info
156156

157-
We are using `expo-camera` to request camera permissions in example app. You can install and build it using the
157+
We are using `expo-camera` to request camera permissions in the example app. You can install and build it using the
158158
following command:
159159

160160
```bash

docs/react/connecting.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 2
66

77
## Prerequisites
88

9-
In order to connect, you need a `PEER_TOKEN` and the `FISHJAM_URL`.
9+
In order to connect, you need a **Peer Token** and the **Fishjam URL**.
1010

1111
## Connecting
1212

docs/room-manager.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,28 @@ sidebar_position: 4
44

55
# Room Manager
66

7-
The **default sandbox app** comes with an HTTP server called **Room Manager**.
8-
It allows you to start working on the Client App without having to setup an actual backend.
9-
However, for production purposes, you need to bring own backend using our Server SDKs. Production apps doesn't have a corresponding Room Manager.
7+
## App for Initial Development
8+
9+
The [**default Sandbox App**](https://fishjam.io/app/sandbox) comes with an HTTP server called **Room Manager**.
10+
It allows you to start working on the Client App without having to set up an actual backend.
11+
However, for production purposes, you need to bring your own backend using our Server SDKs. Production apps don't have a corresponding Room Manager.
1012

1113
:::danger[ROOM MANAGER IS NOT SAFE FOR PRODUCTION]
1214

1315
Room Manager doesn't implement any form of authentication.
1416
Anyone using the same room name and peer name will receive **the same Peer Token!**
1517

16-
For production environment, make sure to [set up your own backend](/production/server.mdx) using our Server SDKs and authenticate the client on your own.
18+
For a production environment, make sure to [set up your own backend](/production/server.mdx) using our Server SDKs and authenticate the client on your own.
1719

1820
:::
1921

20-
## Why should I use it?
22+
## Why Should I Use It?
2123

2224
If you're a frontend developer and you want to quickly test your app, you can use the Room Manager to create a room and access it.
23-
This way you can start building your app without having to deploy any server side logic.
25+
This way, you can start building your app without having to deploy any server-side logic.
2426

2527
:::note
26-
When moving to production, the only change you will need to make is to retrieve the **peer token from your backend** instead of the room manager.
28+
When moving to production, the only change you will need to make is to retrieve the **peer token from your backend** instead of the Room Manager.
2729
:::
2830

2931
:::tip
@@ -34,18 +36,22 @@ It can be used as a reference for building your backend.
3436

3537
:::
3638

37-
## How do I use it?
39+
## How Do I Use It?
3840

39-
Simply take the Fishjam instance url of your `sandbox` app, which should look like `https://fishjam.io/api/v1/connect/***`, append a
40-
`/room-manager` path and use `roomName` and `peerName` query params to build an url for the GET request.
41+
Simply log in to your Fishjam Dashboard and open the [Sandbox App](https://fishjam.io/app/sandbox). You will see your Room Manager URL there.
42+
Now you need to add `roomName` and `peerName` query params to build a URL for the GET request.
4143

42-
#### Example GET request url
44+
#### Example GET Request URL
4345

4446
```
4547
https://fishjam.io/api/v1/connect/<YOUR_APP_UUID>/room-manager?roomName=foo&peerName=bar
4648
```
4749

48-
#### Example response
50+
:::note
51+
`YOUR_APP_UUID` is your unique ID. Anyone who knows that ID can join your rooms. To reset this ID, you have to open the Sandbox App, press Settings, and Reset App.
52+
:::
53+
54+
#### Example Response
4955

5056
```json
5157
{

0 commit comments

Comments
 (0)