Skip to content

Commit 2e421d4

Browse files
fix: stop camera after stop publishing video track(windows). (#960)
close #355 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Adjusted track mute behavior so the platform-specific condition now targets only Firefox on web. * Fixed Windows behavior to ensure the camera stops after a video track is unpublished. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com>
1 parent bd7d937 commit 2e421d4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patch type="fixed" "Windows: stop camera after unpublishing video track"

lib/src/support/platform.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ BrowserVersion lkBrowserVersion() => lkBrowserVersionImplementation();
3939

4040
/// skips stop/replaceTrack for the following platforms and only toggles
4141
/// track.enabled.
42-
bool skipStopForTrackMute() =>
43-
{PlatformType.windows}.contains(lkPlatform()) ||
44-
(lkPlatformIs(PlatformType.web) && [BrowserType.firefox].contains(lkBrowser()));
42+
bool skipStopForTrackMute() => (lkPlatformIs(PlatformType.web) && [BrowserType.firefox].contains(lkBrowser()));
4543

4644
enum PlatformType { web, windows, linux, macOS, android, fuchsia, iOS }
4745

0 commit comments

Comments
 (0)