Adrian Ber
Adrian Ber

Reputation: 21360

WebRTC stream and device

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

Answers (1)

jib
jib

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

Related Questions