|
| 1 | +--- |
| 2 | +sidebar_position: 5 |
| 3 | +--- |
| 4 | + |
| 5 | +import Tabs from "@theme/Tabs"; |
| 6 | +import TabItem from "@theme/TabItem"; |
| 7 | + |
| 8 | +# Audio-only Calls |
| 9 | + |
| 10 | +In many use cases, you only need real-time audio, without any video streaming. |
| 11 | +If your use case falls into this category, then you can benefit greatly from using `audio_only` rooms in Fishjam. |
| 12 | + |
| 13 | +<!-- TODO(Tomasz Mazur): uncomment this once pricing page is ready --> |
| 14 | +<!-- ## Why Should I Care? --> |
| 15 | +<!----> |
| 16 | +<!-- Audio-only rooms are heavily discounted compared to normal rooms. --> |
| 17 | +<!-- As described in more detail on the [pricing page](https://fishjam.io/#pricing), Fishjam rooms are priced based on the total connection time of peers in them. --> |
| 18 | +<!-- Audio-only rooms come at a 75% discount. --> |
| 19 | +<!-- For example, if you have a normal room with 2 peers connected for 30 minutes, then the total cost of the room will be equal to the cost of 60 minutes. --> |
| 20 | +<!-- If the same room were audio-only, then the final cost of the room will only be equal to 15 minutes. --> |
| 21 | + |
| 22 | +## How Do I Use It? |
| 23 | + |
| 24 | +Using this feature is as easy as setting the `roomType` field to `audio_only` when creating a room using our [Server SDKs](/production/server) |
| 25 | + |
| 26 | +<Tabs groupId="language"> |
| 27 | + <TabItem value="ts" label="Typescript"> |
| 28 | + |
| 29 | + ```ts |
| 30 | + const createdRoom = await fishjamClient.createRoom({ roomType: 'audio_only' }); |
| 31 | + ``` |
| 32 | + |
| 33 | + </TabItem> |
| 34 | + |
| 35 | + <TabItem value="python" label="Python"> |
| 36 | + |
| 37 | + ```python |
| 38 | + options = RoomOptions(room_type="audio_only") |
| 39 | + created_room = fishjam_client.create_room() |
| 40 | + ``` |
| 41 | + |
| 42 | + </TabItem> |
| 43 | + </Tabs> |
| 44 | + |
| 45 | +Now, you can connect peers normally to the room as described in our [React Native](/react-native/connecting) and [React](/react/connecting) docs. |
| 46 | + |
| 47 | +:::info |
| 48 | +The React Native and React SDKs will log a warning in the console if any attempt to add video to an audio-only room is made. |
| 49 | +This aims to assist in debugging, as adding video to an audio-only room does nothing and is most likely a mistake. |
| 50 | +::: |
| 51 | + |
| 52 | +### Screen sharing |
| 53 | + |
| 54 | +If you attempt to screen share when connected to an `audio_only` room, then only the audio will actually be sent to the other peers. |
0 commit comments