signalwire-js
signalwire-js copied to clipboard
Fix outbound audio/video stream
Description
If a token is created by setting "join_video_muted": true
, the SDK expects to receive the room.subscribed
event with video_muted
true for the self-member. Based on this event, the SDK is supposed to stop the outbound audio/video stream.
This PR extracts the room.subcsribed
event callback handling part out of the mediaElementSaga
since the rootElement
is an optional property and the whole outbound stream logic does not depend on it.
Type of change
- [ ] Internal refactoring
- [x] Bug fix (bugfix - non-breaking)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Code snippets
In case of new feature or breaking changes, please include code snippets.