Closed Bug 1694304 Opened 5 years ago Closed 3 years ago

Light on camera on when track.enabled = false

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox88 --- wontfix
firefox114 --- fixed

People

(Reporter: mt, Assigned: pehrsons)

References

Details

Attachments

(1 file)

According to https://blog.mozilla.org/webrtc/better-privacy-on-camera-mute-in-firefox-60/ the expected behaviour when a track is muted is to turn the camera light off. This means that video conferences can retain access to cameras and microphones, but not show the little light on the camera when the camera is not actively being used.

This is good, but it looks like it doesn't work on my machine. I've tested with https://jyasskin.github.io/sandbox/camera-pause/ and https://jsfiddle.net/jib1/cfcoqdwz/ and disabling the track does not result in the camera light going out.

This is Windows 10, with a Logitech USB camera. It is using the Microsoft default driver, so I can't get much more precise information. It is the one that Mozilla was providing around 6-ish years back, similar in appearance to the C910.

Jib, any thoughts here?

Flags: needinfo?(jib)

I can reproduce this.

Severity: -- → S4
Priority: -- → P3

I can reproduce this as well. I think it's a privacy comfort issue, and would like to raise priority on this.

The STRs work fine on macOS with the same Logitech camera, so affected platform seems correct (Windows only).

Severity: S4 → S3
Flags: needinfo?(jib)
Priority: P3 → P2

Setting enabled on a camera track leads to LocalMediaDevice::Start() or LocalMediaDevice::Stop(). These call through to the methods on MediaEngineRemoteVideoSource with the same name. These in turn call CamerasChild::StartCapture() and CamerasChild::StopCapture(), respectively, which get bounced over to CamerasParent.

For CamerasParent::StopCapture(), if this was the last use of the device that stopped, we call StopCapture() on the backend.

Now, StopCapture for all backends are here: Windows, MacOS old, MacOS new, Linux, Android.

So for Windows, StopCapture() calls IMediaControl::Pause() whose docs say:

The Pause method pauses all the filters in the filter graph.

Remarks
Pausing the filter graph cues the graph for immediate rendering when the graph is next run. While the graph is paused, filters process data but do not render it. (...)

IMediaControl::Stop() would probably do what we expect here. It says:

(...) If you call this method and then call the IMediaControl::Run method, playback resumes from the stopped position. (...)

So it might be that all we need is a simple s/Pause/Stop/ replacement.

Assignee: nobody → apehrson
Status: NEW → ASSIGNED

Upstream commit: https://webrtc.googlesource.com/src/+/28ac56a415a7513f1ebfb985659bf2012d84df3f
In VideoCaptureDS::Stop() fully stop the device

This makes the device light turn off when stopped.

Bug: webrtc:15109
Change-Id: I1deecbc2463e2e316e01ff1f061ab6b0313c1aa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302200
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39953}
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dabb9e2ec9d3 cherry-pick libwebrtc 28ac56a415. r=webrtc-reviewers,jib
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: