Skip to content

Commit

Permalink
custom events
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli committed May 15, 2024
1 parent bbec1ee commit 7c25ccd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Webhooks",
"label": "Events and Webhooks",
"position": 6
}
35 changes: 35 additions & 0 deletions docusaurus/video/docusaurus/docs/api/webhooks/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@ slug: /webhooks/overview
title: Overview
---

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

## Custom events

You can send custom events to all users watching a call, events can be send client-side or server-side. It is not necessary for users to be part the call, you call objects can be "watched" before joining as well.
Client-side you can observe calls and receive events by passing the `watch:true` parameter to any of these endpoints: `GetCall`, `QueryCalls`, `JoinCall`.

<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

```js
// send a custom event to all users watching the call
TODO
```

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

```py
# send a custom event to all users watching the call
call.send_call_event(user_id=user.id, custom={"render-animation": "balloons"})
```

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

```bash
TODO
```

</TabItem>
</Tabs>


You can configure your Stream app to send events to your HTTP/webhook and/or to your AWS SQS queue. Webhooks are usually
the simplest way to receive events from your app and to perform additional action based on what happens to your application.

Expand Down

0 comments on commit 7c25ccd

Please sign in to comment.