当前位置: 动力学知识库 > 问答 > 编程问答 >

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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: