Skip to content

Commit

Permalink
fix: unpublish screen audio when stop screen share.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Oct 25, 2023
1 parent 7dc614f commit d8d677d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
} else {
if (source == TrackSource.screenShareVideo) {
await unpublishTrack(publication.sid);
final screenAudio =
getTrackPublicationBySource(TrackSource.screenShareAudio);
if (screenAudio != null) {
await unpublishTrack(screenAudio.sid);
}
} else {
await publication.mute();
}
Expand Down

0 comments on commit d8d677d

Please sign in to comment.