-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ScreenShare Audio support (#1118)
Adds support for Screen Share Audio tracks in React and Plain-JS SDKs. Additionally, certain Screen Share parameters (FPS, max bitrate) can be configured by integrators as well.
- Loading branch information
Showing
40 changed files
with
1,460 additions
and
204 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
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
77 changes: 77 additions & 0 deletions
77
packages/client/docusaurus/docs/javascript/02-guides/04-screensharing.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,77 @@ | ||
--- | ||
id: screensharing | ||
title: Screen Sharing | ||
description: Managing Screen Sharing | ||
--- | ||
|
||
If you want to see the device management API in action, you can check out [the sample app](https://github.com/GetStream/stream-video-js/tree/main/sample-apps/client/ts-quickstart). | ||
|
||
## Screen Sharing | ||
|
||
### Start/Stop Screen Sharing | ||
|
||
```typescript | ||
call.screenShare.toggle(); | ||
|
||
// or | ||
call.screenShare.enable(); | ||
call.screenShare.disable(); | ||
``` | ||
|
||
### Screen Sharing Status | ||
|
||
Here is how you can access the status of screen sharing: | ||
|
||
```typescript | ||
call.screenShare.state.status; // enabled, disabled or undefined | ||
|
||
// or, if you want to subscribe to changes | ||
call.screenShare.state.status$.subscribe((status) => { | ||
// enabled, disabled or undefined | ||
}); | ||
``` | ||
|
||
### Screen Sharing Settings | ||
|
||
The behavior of the screen share video track can be customized, and a few parameters can be set: | ||
|
||
```typescript | ||
call.screenShare.setSettings({ | ||
maxFramerate: 15, // will be clamped between 1 and 15 fps | ||
maxBitrate: 1500000, // will use at most 1.5Mbps | ||
}); | ||
|
||
call.screenShare.enable(); | ||
``` | ||
|
||
### Render Screen Share | ||
|
||
Please follow our [Playing Video and Audio guide](../../guides/playing-video-and-audio/). | ||
|
||
## Screen Share Audio | ||
|
||
### Start/Stop Screen Share Audio | ||
|
||
```typescript | ||
// enable it | ||
call.screenShare.enableScreenShareAudio(); | ||
|
||
// publish video and audio (if available, and supported by the browser) | ||
call.screenShare.enable(); | ||
|
||
// disable it | ||
call.screenShare.disableScreenShareAudio(); | ||
``` | ||
|
||
### Play Screen Share Audio | ||
|
||
Please follow our [Playing Video and Audio guide](../../guides/playing-video-and-audio/). | ||
|
||
### Caveats | ||
|
||
Screen Share Audio has limited support across browsers and platforms. | ||
For most up-to-date information, please take a look at [Browser Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture#browser_compatibility). | ||
|
||
In addition to that, there are a [few caveats](https://caniuse.com/?search=getDisplayMedia) that you should be aware of: | ||
|
||
- On Windows, the entire system audio can be captured, but on MacOS and Lunux, only the audio of a tab can be captured. |
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
Oops, something went wrong.