Audio devices plugin and plugout event on chrome browser
I'm building an audio chat web application using WebRTC. So I trying to build that if any external audio device get plugged-in to the system my application automatically start using that microphone and when that external device plugged out application start using system default microphone (as Hangout do).
Is there any event that notify me about device plugged-in plugged-out information?(For chrome browser)
Is there any way to know which device to use in all the listed device that we get from browser so that we actually get an audio? (For example as in desktop systems there are two microphone jacks one in front-side another in back-side so when get Media Devices in browser we will get both jacks as device, but how to choose between both jacks that in this particular jack a microphone is plugged-in)
How system choose default device. Is it good to use always default device?
What is the difference between default and communication devices that browser provides?
(1) in the spec, a devicechange event is fired on the navigator.mediaDevices object. That is not yet implemented in Chrome. You can poll navigator.mediaDevices.enumerateDevices which has a performance impact however.
(2) enumerate the devices and look at their labels? See this sample
链接地址: http://www.djcxy.com/p/60194.html上一篇: 输入队列回调调用但没有数据