This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This PR introduces changes from: fishjam-dev/ts-client-sdk#49 and also: ### useCamera, useMicrophone, useScreenshare Hooks for managing a single track of a given type in the global state (similarly to the React Native API). #### onDeviceStop `onDeviceStop?: "remove" | "mute"; This PR introduces a new `onDeviceStop` config parameter that allows the user to decide what to do if a track stops. Without it, the track has been removed from `RTCPeerConnection`. Now, with the option `mute`, that track can be reused later without renegotiation. It is a companion event to `onDeviceChange`. Added `onDeviceStop`, `onDeviceChange`, and the ability to stop a device to `use-camera-and-microphone-example`. #### onDeviceChange `onDeviceChange?: "replace" | "stop";` Determines whether a track should be replaced when the user requests a device change. Previously, `broadcastOnDeviceChange`. #### Other changes - Names of types like `UseMicrophoneResult` changed to something simpler, like `MicrophoneAPI`. ## Motivation and Context Fishjam now offers the ability to reuse tracks. ## Types of changes - [ ] Bug fix (a non-breaking change that fixes an issue) - [ ] New feature (a non-breaking change that adds functionality) - [x] Breaking change (a fix or feature that would cause existing functionality to not work as expected) - The `replaceTrack` method can handle a nullable track parameter. - The `stream` parameter was removed from the `addTrack` method.
- Loading branch information
1 parent
e7b883e
commit cb4eeed
Showing
15 changed files
with
344 additions
and
244 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
examples/use-camera-and-microphone-example/src/DeviceControls.tsx
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.