简体   繁体   English

来自javascript的麦克风音量控制

[英]microphone volume control from javascript

I'd like to be able to control the system microphone volume from the browser. 我希望能够从浏览器控制系统麦克风音量。

I know that the microphone can be recorded from using Flash or Silverlight, but these don't allow control of the microphone volume. 我知道可以使用Flash或Silverlight录制麦克风,但这些不允许控制麦克风音量。 (Flash has Microphone.gain , but as its just a software multiplier, it doesn't help when the system mic volume is muted or too loud.) I suppose the mic could be modified via a Trusted Java Applet via JNI, but getting Java installed on a user's computer is hard for non-savvy users. (Flash有Microphone.gain ,但由于它只是一个软件倍增器,当系统麦克风音量静音或太大时它没有帮助。)我想可以通过JNI通过Trusted Java Applet修改麦克风,但获得Java安装在用户计算机上对于非精明的用户来说很难。 (Not to mention the problems with getting an Applet to consistently load.) (更不用说让Applet持续加载的问题。)

I've heard that HTML5 will have some sort of microphone access, but whether it will allow volume control is unclear to me. 我听说过HTML5会有某种麦克风访问,但我是否也不清楚它是否允许音量控制。 At any rate, I don't think any browsers support it yet. 无论如何,我认为任何浏览器都不支持它。

Are there any plugins that would allow volume control? 有没有允许音量控制的插件? The old Google Gears project has some AudioApi docs, though these don't seem to have made it into the actual plugin. 旧的Google Gears项目有一些AudioApi文档,虽然这些文档似乎没有成为实际的插件。 There's also the Google Talk plugin - it seems to do some kind of gain control, but its unclear if there's an api to the plugin. 还有谷歌Talk插件 - 它似乎做了某种增益控制,但不清楚该插件是否有api。

Perhaps there's a draft HTML5 implementation plugin for microphone access (like indexeddb , for example)? 也许有麦克风访问的HTML5实现插件草案(比如indexeddb )?

The verdict is that it would be a security concern. 判决结果是,这将是一个安全问题。 There is no way the system microphone volume can be changed by a browser application unless a plugin is used, just like there is no way to change the system speaker volume. 除非使用插件,否则浏览器应用程序无法更改系统麦克风音量,就像无法更改系统扬声器音量一样。 However, you can amplify or reduce the input stream in Flash or Java. 但是,您可以放大或缩小Flash或Java中的输入流。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM