使用JavaScript检测声音 [英] Detect Audible Sound with JavaScript

查看:89
本文介绍了使用JavaScript检测声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用jscript来检测某个页面是否正在发出噪音?某种环境变量还是某种跟踪扬声器状态的变量?我正在尝试编写一个脚本,如果该标签发出声音,则会在该标签标题上放置一个图标.

Is there any way to detect whether a certain page is making noise using jscript? Some sort of environmental variable or something that tracks the status of the speakers? I'm attempting to write a script that puts an icon on the Tab Title if that Tab is making sound.

推荐答案

否,这是不可能的.

很多插件都可以发出声音,而且它们都以自己的方式发出声音.这里没有万能的东西.

Lots of plugins can make sound, and they all do it in their own way. There is no catch-all here.

也许在Vista/7上实际上可以跟踪应用程序的声音使用情况,并且在使用像Chrome这样的浏览器对每个页面进行单独处理的浏览器时,您可能会碰运气.它将涉及找出哪些进程正在播放声音,然后找出每个进程已加载了哪个页面.通过JavaScript吗?没办法.

Perhaps on Vista/7 where applications sound usage is actually kept track of, and when using a browser like Chrome that makes a separate process for each page, you might have more luck. It would involve figuring out which processes are playing sound, then figuring out what page each process had loaded. Through JavaScript though? No way.

这篇关于使用JavaScript检测声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆