Closed
Bug 1191298
Opened 10 years ago
Closed 10 years ago
getUserMedia fails for audio if constraints are specified
Categories
(Core :: WebRTC: Audio/Video, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox41 | --- | unaffected |
firefox42 | + | verified |
firefox43 | --- | verified |
backlog | webrtc/webaudio+ |
People
(Reporter: paweldomas, Assigned: jib)
References
(Blocks 1 open bug)
Details
(Keywords: regression, testcase)
Attachments
(2 files)
1.03 KB,
text/html
|
Details | |
40 bytes,
text/x-review-board-request
|
jesup
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36
Steps to reproduce:
Calling getUserMedia with constraints for audio only stream fails:
{
audio: true,
video: false
}
Actual results:
MediaStreamError {
name: "NotFoundError",
message: "The object can not be found here.",
constraintName: "",
stack: ""
}
Expected results:
Audio only media stream should be returned.
This happens with the latest nightly build 42.0a1 (2015-08-04). I have USB camera with integrated microphone, but it also fails on all of my laptops.
Calling with the constraints below works fine:
{
audio: true,
video: true
}
Could you attach a minimal testcase to reproduce the issue, please.
Component: Untriaged → WebRTC: Audio/Video
Flags: needinfo?(paweldomas)
Keywords: testcase-wanted
Product: Firefox → Core
Reporter | ||
Comment 2•10 years ago
|
||
Sorry I should have done it in the first place: http://pastebin.com/SY1vU6uy
It turned out that it works when { audio: true }, but it does not allow to specify optional constratins like we do in the example above. It used to work until few days ago.
Flags: needinfo?(paweldomas)
It's a recent regression:
good=2015-07-27
bad=2015-07-28
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d3228c82badd&tochange=33dc8a83cfc0
suspected: bug 1156472
Blocks: 1156472
Status: UNCONFIRMED → NEW
status-firefox41:
--- → unaffected
status-firefox42:
--- → affected
tracking-firefox42:
--- → ?
Ever confirmed: true
Flags: needinfo?(padenot)
OS: Unspecified → All
Hardware: Unspecified → All
Version: Trunk → 42 Branch
Comment 5•10 years ago
|
||
Tracked for 42, because this is a regression, and expectation would be that the audio would work consistently.
Updated•10 years ago
|
backlog: --- → webRTC+
Rank: 10
Priority: -- → P1
Comment 6•10 years ago
|
||
Hey Paul, this looks like fallout from your audio capture landing.
Assignee: nobody → padenot
Comment 8•10 years ago
|
||
After talking with Jan-Ivar, he thought of a better fix and knows the area better, so he's taking this one.
Assignee: padenot → jib
Assignee | ||
Comment 9•10 years ago
|
||
Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
Attachment #8645767 -
Flags: review?(padenot)
Assignee | ||
Comment 10•10 years ago
|
||
We don't support the (non-spec) constraints in comment 0, so they're ignored, but we fail even on an empty {}, which is a regression: http://jsfiddle.net/03d0frua
Summary: getUserMedia fails for audio only → getUserMedia fails for audio if constraints are specified
Assignee | ||
Comment 11•10 years ago
|
||
Comment on attachment 8645767 [details]
MozReview Request: Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
Attachment #8645767 -
Flags: review?(rjesup)
Assignee | ||
Comment 12•10 years ago
|
||
Extending review to jesup. I'll take the first review I get.
Comment 13•10 years ago
|
||
Comment on attachment 8645767 [details]
MozReview Request: Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
https://reviewboard.mozilla.org/r/15547/#review13953
Ship It!
Attachment #8645767 -
Flags: review?(rjesup) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 14•10 years ago
|
||
Looks good, but this needs tests, let me know if you want me to write some.
Flags: needinfo?(jib)
Assignee | ||
Comment 15•10 years ago
|
||
I'm a bit unsure how to test this since our fake devices don't really have constraints yet, so there's nothing to work against for a test. Even the linux loopback devices don't have this AFAIK?
test_getUserMedia_constraints.html only really exercises the code and tests known failure paths for any device. The success path in it doesn't really do anything other than test that the syntax passes.
If you have tests in mind for this then that would be great!
Flags: needinfo?(jib)
Comment 16•10 years ago
|
||
It's hard/impossible to test this in automation currently (and this affects other aspects of constraints). Let's manually test this, and file a bug for automated tests, and another bug (blocking the test bug, and likely some others (or others we should file)) for adding support for constraints to the fake devices and/or the loopback devices. (Loopback is probably better, as it tests more of the real code paths, but for constraints testing this may not matter.)
Lack of being able to test these has bitten us before, so this should be a high P2 at least.
Flags: needinfo?(padenot)
Comment 17•10 years ago
|
||
It might be hard to write integration tests for this because it indeed relies on devices enumeration, but that sounds like something that should be mocked and tested with unit tests.
Flags: needinfo?(padenot)
Comment 18•10 years ago
|
||
Filed the bug (and hooked to the bug for making the fake/loopback devices more real)
Comment 19•10 years ago
|
||
I'm good with c++ unit tests or updating the fake/loopback devices. This is an important-enough regression (and too hard to back out the regressing code) I'd like to manually test this, land it, and then backfill with tests. I'm good with making tests a P1 (and there are less hurdles in getting a c++ unit test added compared to changes to the loopback devices, though perhaps more code to write).
Updated•10 years ago
|
Attachment #8645767 -
Flags: review?(padenot)
Comment 20•10 years ago
|
||
Keywords: checkin-needed
Comment 21•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Assignee | ||
Comment 22•10 years ago
|
||
Comment on attachment 8645767 [details]
MozReview Request: Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
Approval Request Comment
[Feature/regressing bug #]: Bug 1156472
[User impact if declined]:
Users will no longer get prompted to share their cameras or microphones on sites that specify audio-constraints of any kind. Even if they provide zero audio constraints e.g. they pass {audio: {}} instead of {audio:true} to getUserMedia, then getUserMedia will always fail immediately with NotFoundError instead of prompting the user.
[Describe test coverage new/current, TreeHerder]:
Tested locally. Landed on m-c a week ago.
[Risks and why]:
Very low risk, because the new code mirrors similar code that exists for video, but was missing for audio. Only code dealing directly with audio constraints is modified (plus a minor variable rename in video for symmetry).
[String/UUID change made/needed]: none
Attachment #8645767 -
Flags: approval-mozilla-aurora?
Comment 24•10 years ago
|
||
Comment on attachment 8645767 [details]
MozReview Request: Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression)
Fix a regression, taking it.
Attachment #8645767 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
Flags: qe-verify+
Comment 26•10 years ago
|
||
Reproduced with 42.0a1 (from 2015-08-05).
Verified fixed with 42.0b2 and 43.0a2 (from 2015-09-29), across platforms [1].
[1] Windows 7 64-bit, Ubuntu 14.04 64-bit and Mac OS X 10.10.4
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in
before you can comment on or make changes to this bug.
Description
•