Closed Bug 1164838 Opened 9 years ago Closed 9 years ago

add support for MediaStreamTrack.getSources

Categories

(Core :: Audio/Video, defect)

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1046245

People

(Reporter: marc, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150420225811
Firefox for Android

Steps to reproduce:

Currently Firefox doesn't support MediaStreamTrack.getSources

Go to: http://simpl.info/getusermedia/sources/index.html


Actual results:

It's not possible to list the available audio / video devices and switch between them.


Expected results:

MediaStreamTrack.getSources should be supported

There is an old IRC discussion here: http://logs.glob.uno/?c=mozilla%23media&s=21+Nov+2013&e=21+Nov+2013#c39969

In it, it says:
"No specific ETA. A driving need would help push the priority. It's not a tough one. I'm going to ask the developer what their use-case is since I can't think of one that isn't just a demo of the feature."

So I have a driving need for this where in my web application users are asked to take either a picture of themselves or a picture of a document. They take the picture of themselves with the front camera and of the document with the back camera so I need them to be able to switch between cameras. User is asked what device to use when they are prompted to allow for usage of the camera but if they chose the wrong one then they can't change it afterwards and if they allowed it forever then they are not prompted anymore.
Component: Untriaged → Video/Audio
Product: Firefox → Core
MediaStreamTrack.getSources() is obsolete, and has been replaced in the spec by MediaDevices.enumerateDevices(), which was implemented in 39 (Bug 1046245).

The ability to switch cameras with the deviceId constraint was added in 42 (Bug 1037389).

See http://webrtc.github.io/samples/src/content/getusermedia/source for the latest, though I've submitted a PR [1] to fix a bug in it.

[1] https://github.com/webrtc/samples/pull/541
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
The link you gave works on my desktop (firefox 39.0) but it doesn't work on my mobile (tried both firefox 39.0 and firefox beta 40.0). It works with chrome (43.0.2357.93) on my mobile.
I also see that the page isn't working correctly on Android, as I don't get any camera or microphone choices. I'll investigate. Thanks for the heads up.

In the meantime, this fiddle works on Android for me: http://jsfiddle.net/m6japvw1
You need to log in before you can comment on or make changes to this bug.