问题描述:

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.

网友答案:

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).

相关阅读:
Top