Reputation: 21360
For a WebRTC stream, how can I get the devices that streams it? For each stream there's getAudio/VideoTracks() and for each track there's getCapabilities().deviceId, but getCapabilities() doesn't seem to be implemented.
I tested in Firefox and Chrome.
Upvotes: 2
Views: 419
Reputation: 42430
You are right, getCapabilities
has not been implemented yet.
In the meantime use track.label
and track.kind
and compare it against the device label and kind you get from enumerateDevices
. Works in Chrome and Firefox 46 (Firefox Developer Edition).
Upvotes: 3