开发者

Detect if speakers are plugged in?

Is there any way to detect if computer has speakers plugged in? It would be nice if that would be possible with J开发者_StackOverflowavaScript, but if not, then my best bet would be Java.

But, yeah, I haven't worked with Java at all, any useful resources on this?

Thanks in advance!

EDIT:

So the answer for this is "impossible" and I shouldn't even bother looking for a solution?


Every piece of software I've seen that needs to determine such a thing provides a way for the user to play a "test sound" and give the application some appropriate feedback. That seems to be the most practical solution.


The computer itself is not, in general, aware of this.
Some audio drivers are, but they don't expose the information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜