Closed Bug 1187738 Opened 9 years ago Closed 9 years ago

WebRTC - Add label to audio and video tracks

Categories

(Core :: WebRTC, defect, P2)

42 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 866513

People

(Reporter: cjansss, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [good-first-bug])

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36

Steps to reproduce:

0. Enable media.navigator.streams.fake in about:config
1. Browse to https://webrtc.github.io/samples/src/content/getusermedia/gum/
2. Open the console and type "streams.getVideoTracks()[0].label" and streams.getAudioTracks()[0].label


Actual results:

Empty string


Expected results:

Fake Video and Fake Audio.

This would be very useful when testing the WebRTC JS api using Selenium since it's the only way to deduce what device is actually attached to a mediaStream.
Component: Untriaged → WebRTC
Product: Firefox → Core
We'd happily take a patch for this, but given our other priorities (and available devs), I need to put this in the parking-lot.
Status: UNCONFIRMED → NEW
backlog: --- → parking-lot
Ever confirmed: true
Whiteboard: [good-first-bug]
Summary: WebRTC - Add device label to fake audio and video devices → WebRTC - Add label to audio and video tracks
Label is not yet implemented in MediaStreamTrack, is the issue here, so the fake devices are not at fault, and this is a spec compliance issue, so I recommend upping priority a bit.
We need a way to identify the source of MediaStream/Track, especially when we are sharing a video stream.
we need the attached source details like webcam/screen_number/window_name/source_process_id.
Flags: needinfo?(mreavy)
Given that this is a spec compliance issue and some handy use cases are starting to emerge that need this, I'm taking this out of the parking lot and making it a low P2.  

Again, if anyone wants to contribute a patch, I'll happily make sure it gets reviewed quickly.
Blocks: webrtc_spec
backlog: parking-lot → webrtc/webaudio+
Rank: 29
Flags: needinfo?(mreavy)
Priority: -- → P2
(In reply to AjayG from comment #4)
> we need the attached source details like webcam/screen_number/window_name/source_process_id.

Labels are meant for display, so source_process_id seems a bit too technical, but the other ones yes.

The Media Capture and Streams spec (see URL) say we "MUST return the label of the object's corresponding source, if any. If the corresponding source has or had no label, the attribute MUST instead return the empty string".

But the latest Screen Capture spec as of this writing [1] says "Each potential source of capture is treated by this API as a discrete media source". So it would follow that you'd get descriptive labels for each capture.

[1] http://w3c.github.io/mediacapture-screen-share/#device-identifiers
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.