Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit e07f161

Browse files
authored
[camera_web] Mute the camera preview (#4280)
* feat: mute the camera preview * test: update camera video element test with muted set to true
1 parent 863d088 commit e07f161

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/camera/camera_web/example/integration_test/camera_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void main() {
9898

9999
expect(camera.videoElement, isNotNull);
100100
expect(camera.videoElement.autoplay, isFalse);
101-
expect(camera.videoElement.muted, !audioConstraints.enabled);
101+
expect(camera.videoElement.muted, isTrue);
102102
expect(camera.videoElement.srcObject, mediaStream);
103103
expect(camera.videoElement.attributes.keys, contains('playsinline'));
104104

packages/camera/camera_web/lib/src/camera.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Camera {
119119

120120
videoElement
121121
..autoplay = false
122-
..muted = !options.audio.enabled
122+
..muted = true
123123
..srcObject = stream
124124
..setAttribute('playsinline', '');
125125

0 commit comments

Comments
 (0)