Getting HTML5 audio input label
I've got an application where I'm using HTML5 to record audio, using getUserMedia() with the WebAudioApi. My application works great, however I'd really like to be able to log the input device they used to perform the recording, eg, the default built-in laptop mic versus a headset. I've found that there are ways to enumerate the various input devices through mediaDevices.enumerateDevices() -- this allows me to see the identifiers I'm interested in. There is also MediaStreamTrack.getAudioSources() which would allow me to set up a similar list of audio input sources. What I seem to be missing though is a way to query the API to ask what device was used either just before or after a recording takes place.
链接地址: http://www.djcxy.com/p/60192.html下一篇: 获取HTML5音频输入标签