游戏提示your.net api browserr dose not support web audio api

Can I use Web Audio API
Green = Supported
Red = Not supported
Greenish yellow = Partial support
Gray = Support unknown
Global usage
High-level JavaScript API for processing and synthesizing audio
Popular versionsAll versionsIE5.567891011Edge121314151617Firefox233.53.645678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061Chrome4567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768Safari3.13.2455.166.177.1899.11010.11111.1TPOpera99.5-9.610.0-10.110.510.61111.111.511.61212.11516171819202122232425262728293031323334353637383940414243444546474849505152iOS Safari3.24.0-4.14.2-4.35.0-5.16.0-6.17.0-7.188.1-8.49.0-9.29.310.0-10.210.311.0-11.211.3Opera MiniallAndroid Browser2.12.22.3344.14.2-4.34.44.4.3-4.4.462Blackberry Browser710Opera Mobile101111.111.51212.137Chrome for Android64Firefox for Android57IE Mobile1011UC Browser for Android11.8Samsung Internet456.2QQ Browser1.2Baidu Browser7.12Web Audio API: no sound in Chrome - Stack Overflow
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
I'm using Chrome 22.0.1229.94 and can't figure out why I get no audio on any pages using the Web Audio API. I have checked in the flags but there seems to be no flag to enable the API, do I need to do something else to get it to work?
I tried running a simple script to get some audio happening but no sound.
&script type="text/javascript"&
var context = new webkitAudioContext(),
oscillator = context.createOscillator();
oscillator.type = 2;
oscillator.frequency.value = 500;
oscillator.connect(context.destination);
oscillator.noteOn(0);
1,93521733
According to the , noteOn() has been changed to start().
1,12621225
In order to use the current version of the API, you need to use start() instead of noteOn(), stop() instead of noteOff(), and specify the oscillator type as a string.
&script type="text/javascript"&
var context = new webkitAudioContext();
var oscillator = context.createOscillator();
oscillator.type = "square";
oscillator.frequency.value = 500;
oscillator.connect(context.destination);
var now = context.currentT
oscillator.start(now);
oscillator.stop(now + 1);
Specification is found at :
You forgot to add noteOn(0);
&script type="text/javascript"&
var context = new webkitAudioContext(),
oscillator = context.createOscillator();
oscillator.type = 2;
oscillator.frequency.value = 500;
oscillator.connect(context.destination);
oscillator.noteOn(0);
2,07652252
It could be a problem with your Chrome but I see an issue with the script anyway. You should tell it to wait for window to load completely before using Web Audio API. Here is a version of your script that does it:
var init = function () {
var context,
context = new webkitAudioContext();
} catch (e) {
alert("Your browser does not support Web Audio API!");
oscillator = context.createOscillator();
oscillator.type = 2;
oscillator.frequency.value = 500;
oscillator.connect(context.destination);
oscillator.noteOn(0);
oscillator.noteOff(1);
window.addEventListener("load", init);
12.9k42338
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Upcoming Events
ends Mar 27
Stack Overflow works best with JavaScript enabled游戏提示your browser dose not support web audio api怎么办_百度知道
游戏提示your browser dose not support web audio api怎么办
我有更好的答案
到百度搜索重新下载其他浏览器安装吧。
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。Can I use... Support tables for HTML5, CSS3, etc
You can import usage data from your Google Analytics account and see exactly how well a feature is supported among your own site's visitors. Look under the Settings panel to get started!
Usage data for all countries and continents can be imported via the Settings panel.
By default, older browser versions are only shown if they have >= 0.5% usage share. You can increase or decrease this value from the Settings panel.
If a feature you're looking for is not available on the site, you can . Better yet, if you've done the research you can even !
Each feature support table includes a "Usage relative" button. This will resize each browser version cell to be relative to the amount of support it has for the selected usage source.
Current version
Dev version
About these scores
The caniuse browser scores are tallies of all features tracked on caniuse (excluding those marked as "unofficial"). The fully opaque part represents supported features, the semi-transparent part represents partial support.
Note that while caniuse tracks a wide variety of features, it only covers a subset of all web technologies so the scores are not 100% representative of any browser's capabilities.

我要回帖

更多关于 browserhistory api 的文章

 

随机推荐