[jitsi-dev] Associating JitsiLocalTrack with real device

Hi guys,

currently we are associating JitsiLocalTrack with a particular device by passing a deviceId to JitsiLocalTrack's constructor.
In most cases we have 1-to-1 association with devices obtained from enumerateDevice() calls, however there is a case when we use default device ID "" (empty string).
In this case we cannot determine which real device is used by track. However, I found way to do the association by comparing MediaStreamTrack's "label" + "kind" with MediaDeviceInfo's "label" + "kind" pair. This works for Chrome and Firefox, however for Temasys plugin MediaStreamTrack's "label" property is completely different from device's label and looks like some encoded string, e.g. "jxdbKnDYyl" or "nYGJNn7So0".
So I was wondering, maybe someone knows another way of finding what device is used by a particular MediaStreamTrack or how to determine which real device corresponds to default "" ID?

Thanks,
Kostia

I've submitted a bug to Temasys - https://github.com/Temasys/AdapterJS/issues/199.

···

16 мая 2016 г., в 19:49, Константин Цареградский <tsaregradskyi@gmail.com> написал(а):

Hi guys,

currently we are associating JitsiLocalTrack with a particular device by passing a deviceId to JitsiLocalTrack's constructor.
In most cases we have 1-to-1 association with devices obtained from enumerateDevice() calls, however there is a case when we use default device ID "" (empty string).
In this case we cannot determine which real device is used by track. However, I found way to do the association by comparing MediaStreamTrack's "label" + "kind" with MediaDeviceInfo's "label" + "kind" pair. This works for Chrome and Firefox, however for Temasys plugin MediaStreamTrack's "label" property is completely different from device's label and looks like some encoded string, e.g. "jxdbKnDYyl" or "nYGJNn7So0".
So I was wondering, maybe someone knows another way of finding what device is used by a particular MediaStreamTrack or how to determine which real device corresponds to default "" ID?

Thanks,
Kostia