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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion docs/explanation/compositions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sidebar_position: 4.5
description: Understand compositions, the Fishjam feature that mixes multiple live media streams into a single composed output in real time.
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Compositions

_Understanding real-time stream composition in Fishjam_
Expand Down Expand Up @@ -42,11 +45,37 @@ Two defaults keep that in check. A composition auto-starts, and it cleans itself

Delete a composition as soon as you are done with it:

<Tabs groupId="language">
<TabItem value="ts" label="Typescript">

```ts
import { CompositionClient, CompositionId } from "@fishjam-cloud/js-server-sdk";

const compositionClient = new CompositionClient({ managementToken: "" });
const compositionId = "" as CompositionId;

// ---cut---
await compositionClient.deleteComposition(compositionId);
```

</TabItem>
<TabItem value="python" label="Python">

```python
composition_client.delete_composition(composition_id)
```

</TabItem>
<TabItem value="curl" label="curl">

```bash
curl -X DELETE "$COMPOSITION_URL/api/composition/$COMPOSITION" \
curl -X DELETE "https://rtc.fishjam.io/api/composition/$COMPOSITION" \
-H "Authorization: Bearer $TOKEN"
```

</TabItem>
</Tabs>

## Recordings

A **recording** saves what one of a composition's outputs publishes into an MP4 file that stays around after the composition is gone. Recordings are a resource of their own, managed through the [Fishjam Server API](./../api/reference#server) rather than the Composition API: [Recordings](./recordings) explains how they work, and [Record a composition](./../how-to/compositions/record-a-composition) walks through making one.
Expand Down
Loading
Loading