Change left/right balance on playing audio in javascript

北慕城南 提交于 2019-12-05 03:00:30

问题


I know the html5 audio stuff is all very new, but is there a way to change the left/right balance on a sound?

Something like this:

var snd = new Audio("test.mp3");
snd.balance = -1; // only left
snd.play();

回答1:


Currently, this is not supported.

You can check the w3c spec for supported properties and methods. Note that browsers often provide more / less or different things. But in this case: no browser supports audio balance changes.

http://dev.w3.org/html5/spec/Overview.html#audio



来源:https://stackoverflow.com/questions/5123844/change-left-right-balance-on-playing-audio-in-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!