Don't find the right label using MediaStreamTrack.getSources()

121 views
Skip to first unread message

Olivier Anguenot

unread,
Nov 12, 2014, 5:24:06 AM11/12/14
to discuss...@googlegroups.com
Hi,

Tests donne using a Chrome 38 on Mac OSX

I try to propose a screen for selecting the microphone and camera to use in a webRTC application.

Using MediaStreamTrack.getSources(), I receive the list of available sources. But label associated to each track is always an empty string.

In the other hand, once the stream is captured, using the API on the local MediaStream, I can get the list of MediaStreamTracks (stream.getVideoTracks()) and in that case, I have an explicit label ("Camera Facetime Hd...")

Why can't I get the same information using MediaStreamTrack.getSources() ?

Thanks in advance,
Olivier

Philipp Hancke

unread,
Nov 12, 2014, 2:44:22 PM11/12/14
to discuss...@googlegroups.com
To avoid fingerprinting, the label will only be available once the user has granted getUserMedia permissions. Try again after you have called getUserMedia. Note that the permission is retained with https, one more reason not to deploy on http.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages