Skip to content

Commit

Permalink
Fix error when no OTPublisher streamDestroyed handler is set (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffswartz authored Sep 30, 2024
1 parent 2351e33 commit 4a8c854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- [Fix]: Updates react, react-native modules (and axios dependency), and replaces uuid with react-native-uuid. The fixes issue #769. And it prevents [an issue](https://github.com/uuidjs/uuid/issues/375) that would result from using an upgraded version of uuid.

- [Fix]: Fixes an error that resulted if you set an OTPublisher event handler for `streamCreated` without setting one for `streamDestroyed`.

# 2.28.1 (September 2024)

- [Update]: The new `OTPublisher.setAudioTransformers()` method lets you set (and clear) audio transformers. One transformer, the noise suppression filter, is supported. To use this, call the `setAudioTransformers()` method of the OTPublisher ref, and pass in an array with one object that has a `name` property set to `'NoiseSuppression'` and a `properties` property set to an empty string:
Expand Down
2 changes: 1 addition & 1 deletion src/OTPublisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class OTPublisher extends Component {
publisherStreamDestroyedHandler = (stream) => {
if (
this.props.eventHandlers
&& this.props.eventHandlers.streamCreated
&& this.props.eventHandlers.streamDestroyed
&& stream.publisherId === this.state.publisherId
) {
this.props.eventHandlers.streamDestroyed(stream);
Expand Down

0 comments on commit 4a8c854

Please sign in to comment.