MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

AudioContext.listener

AudioContextlistener属性返回一个AudioListener 对象,可以用来实现3D音频空间化。

语法

var audioCtx = new AudioContext();
var myListener = audioCtx.listener;

返回值

An AudioListener object.

例子

注意:想要完整的音频空间化例子,可以查看panner-node DEMO

var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

...

var myListener = audioCtx.listener;

规范

Specification Status Comment
Web Audio API
listener
Working Draft  

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 10.0webkit 25.0 (25.0)  未实现 15.0webkit
22 (unprefixed)
6.0webkit
Feature Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support ? 26.0 1.2 ? ? ? 33.0

另见

文档标签和贡献者

 此页面的贡献者: ayqy
 最后编辑者: ayqy,