Bug 280970
| Summary: | getUserMedia video track getSettings() returns stale value for torch and whiteBalanceMode constraints | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Suzuki <alex> |
| Component: | Media | Assignee: | Eric Carlson <eric.carlson> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | eric.carlson, jer.noble, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 18 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 18 | ||
| URL: | https://github.com/pixelverse-llc/safari-ios18-gum-torch-setting | ||
Alex Suzuki
Calling getSettings() on a video track returns stale values for the `torch` constraint.
In previous versions (iOS 17 and earlier), getSettings() would return `false` for the `torch` constraint after a call to `applyConstraints({ advanced: [ { torch: true ]})` succeeded.
Since iOS 18, getSettings() will now return `false` instead.
This of course makes it hard to determine the current state of the flashlight based on the result of the `getSettings()` call.
Reproducer: https://github.com/pixelverse-llc/safari-ios18-gum-torch-setting
To reproduce: load index.html and wait for the video feed to appear. Press 'ON' to enable the flash, and observe that getSettings() returns `false` for `torch`. Press 'OFF' to disable the flash: getSettings() now returns `true`, the previous value.
The `torch` constraint can be used to toggle the camera flashlight on iOS devices (see: https://www.oberhofer.co/mediastreamtrack-and-its-capabilities/ for a write-up)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/137870391>
Eric Carlson
Pull request: https://github.com/WebKit/WebKit/pull/37920
EWS
Committed 287845@main (46a4e69cafac): <https://commits.webkit.org/287845@main>
Reviewed commits have been landed. Closing PR #37920 and removing active labels.