Closed Bug 1588939 Opened 5 years ago Closed 5 years ago

navigator.mediaDevices.getUserMedia({video:true}) throws MediaStreamError

Categories

(Firefox :: Untriaged, defect)

71 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: guest271314, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

Navigate to a secure context (https:). Execute navigator.mediaDevices.getUserMedia({video:true})

Actual results:

A MediaStreamError error is thrown

        MediaStreamError
          constraint: ""
          message: "Starting video failed"
          name: "AbortError"
          stack: ""

Expected results:

No error or exception should be thrown. The Promise should resolve to a MediaStream containing a MediaStreamTrack of kind video

navigator.mediaDevices.getUserMedia({video:true}) throws an error or exception (uncaught exception: Object when catch() is not used) at Firefox 69 and Nightly 71. {audio:true} does not throw an error.

about:config settings

`
media.devices.insecure.enabled

media.getusermedia.aec 1
media.getusermedia.aec_enabled true
media.getusermedia.aec_extended_filter true
media.getusermedia.agc 1
media.getusermedia.agc_enabled true
media.getusermedia.audiocapture.enabled true
media.getusermedia.browser.enabled true
media.getusermedia.camera.off_while_disabled.delay_ms 3000
media.getusermedia.camera.off_while_disabled.enabled true
media.getusermedia.channels 0
media.getusermedia.insecure.enabled true
media.getusermedia.microphone.off_while_disabled.delay_ms 3000
media.getusermedia.microphone.off_while_disabled.enabled true
media.getusermedia.noise 1
media.getusermedia.noise_enabled true
media.getusermedia.screensharing.enabled true
media.getusermedia.use_aec_mobile false
media.getusermedia
`

When media.navigator.streams.fake is set to true no error is thrown, the MediaStream is the resolved Promise. Was a change made to getUserMedia() for testing with a fake stream which modified the algorithm for when the stream is not fake?

media.navigator.permission.disabled true also resolves the Promise to a MediaStream. Was a recent change made ot permissions component which affects getUserMedia()?

Was able to capture the stream from the camera at Firefox 69. At Nightly 71 when stream is not set to fake the error occurs.

What is the current set of preferences that need to be enabled and/or disabled for navigator.mediaDevices.getUserMedia() to resolve to a MediaStream and not throw an exception?

Uninstalled then reinstalled Firefox. Made sure there were two discrete profiles for Nightly and Firefox. Was able to get both Firefox and Nightly to resolve to a MediaStream.

Evidently two instances of getUserMedia({video:true}) cannot exist at the same time.

RESOLVED => FIXED.

Hey,

"Evidently two instances of getUserMedia({video:true}) cannot exist at the same time." is indeed the correct answer. Thanks for figuring this out on your own.
Will close this issue as resolved:invalid.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: