-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/manual-video-quality
- Loading branch information
Showing
22 changed files
with
215 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,4 @@ proxied | |
enum | ||
everytime | ||
telemedicine | ||
realtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/client/docusaurus/docs/javascript/01-basics/04-supported-platforms.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Supported Platforms and Size | ||
description: A list of supported platforms and SDK size information | ||
--- | ||
|
||
Our Plain-JS Video SDK can run on all modern browsers and platforms. Here is a list of supported platforms: | ||
|
||
- Chrome 91+ | ||
- Firefox 89+ | ||
- Edge 91+ | ||
- Safari and Mobile Safari 15+ | ||
|
||
## WebView | ||
|
||
Our SDK can run in Web View on Android and iOS. However, we recommend using the SDK in a browser for the best experience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/client/docusaurus/docs/javascript/02-guides/10-custom-events.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Custom Events | ||
description: How custom events work | ||
--- | ||
|
||
You can use custom events to send data among the participants in the call. | ||
This is a realtime layer that you can use to broadcast your own events to. | ||
|
||
## Sending custom events | ||
|
||
For example, if you are building a collaborative drawing app, you can send the coordinates to the other participants with the following code: | ||
|
||
```typescript | ||
await call.sendCustomEvent({ | ||
type: 'draw', | ||
x: 10, | ||
y: 30, | ||
}); | ||
``` | ||
|
||
Please note that the total payload for these events is limited to 5KB in size. | ||
|
||
## Receiving custom events | ||
|
||
Custom events are only delivered to clients that are [watching the call](../../advanced/events/#call-events). | ||
|
||
To receive custom events, you need to subscribe to the `custom` event on the call instance: | ||
|
||
```typescript | ||
const unsubscribe = call.on('custom', (event: CustomVideoEvent) => { | ||
const payload = event.custom; | ||
if (payload.type === 'draw') { | ||
console.log(`Received draw event: x=${payload.x}, y=${payload.y}`); | ||
} | ||
}); | ||
|
||
// Unsubscribe when you no longer need to listen to custom events | ||
unsubscribe(); | ||
``` | ||
|
||
For more information, check out our [Events guide](../../advanced/events). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/react-native-sdk/docusaurus/docs/reactnative/03-core/11-custom-events.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Custom Events | ||
description: How custom events work | ||
--- | ||
|
||
You can use custom events to send data among the participants in the call. | ||
This is a realtime layer that you can use to broadcast your own events to. | ||
|
||
## Sending custom events | ||
|
||
For example, if you are building a collaborative drawing app, you can send the coordinates to the other participants with the following code: | ||
|
||
```typescript | ||
await call.sendCustomEvent({ | ||
type: 'draw', | ||
x: 10, | ||
y: 30, | ||
}); | ||
``` | ||
|
||
Please note that the total payload for these events is limited to 5KB in size. | ||
|
||
## Receiving custom events | ||
|
||
Custom events are only delivered to clients that are [watching the call](../../advanced/events/#call-events). | ||
|
||
To receive custom events, you need to subscribe to the `custom` event on the call instance: | ||
|
||
```typescript | ||
const unsubscribe = call.on('custom', (event: CustomVideoEvent) => { | ||
const payload = event.custom; | ||
if (payload.type === 'draw') { | ||
console.log(`Received draw event: x=${payload.x}, y=${payload.y}`); | ||
} | ||
}); | ||
|
||
// Unsubscribe when you no longer need to listen to custom events | ||
unsubscribe(); | ||
``` | ||
|
||
For more information, check out our [Events guide](../../advanced/events). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/react-sdk/docusaurus/docs/React/01-basics/04-supported-platforms.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Supported Platforms | ||
description: A list of supported platforms and SDK size information | ||
--- | ||
|
||
Our React Video SDK can run on all modern browsers and platforms. Here is a list of supported platforms: | ||
|
||
- Chrome 91+ | ||
- Firefox 89+ | ||
- Edge 91+ | ||
- Safari and Mobile Safari 15+ | ||
|
||
## WebView | ||
|
||
Our SDK can run in Web View on Android and iOS. However, we recommend using the SDK in a browser for the best experience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.