AudioContext is a modular interface for audio processing for the WebAudio API.
Questions tagged [audiocontext]
277 questions
0
votes
1 answer
AudioContext not working on Safari 15 running state but currentTime not progressing
I cannot seem to get the AudioContext in Safari 15 to function properly. When you initiate it, it is in a running state, but the AudioContext.currentTime never ticks up and nothing plays. All the previous advice covers old versions of Safari where…

user5962711
- 13
- 4
0
votes
1 answer
mocking AudioContext() in Jest
I have the following code inside a function in my project;
....
if (state.context == null) {
return {
...state,
context: new AudioContext()
}
}
....
I'm trying to test this behaviour in Jest. However, Jest uses jsdom which…

glend
- 1,592
- 1
- 17
- 36
0
votes
1 answer
AudioContext not working on Safari but working on Google Chrome
I know that I need to create audio context after user interaction in Safari. However, the following code still didn't work.
HTML
Javascript
function play() {
var AudioContext = window.AudioContext ||…

Steve
- 1
- 3
0
votes
1 answer
Howler JS & React AudioContext console warning
I am using howler.js in a simple component which renders a button to play an audio file
In the console I am receiving the below warning:
AudioContext error
"The AudioContext was not allowed to start. It must be resumed (or created) after a user…

devlumo
- 3
- 4
0
votes
1 answer
AudioContext and animation do not work on iPhone
I have this little code snippet here
var context = new(window.AudioContext || window.webkitAudioContext)();
.....
var source = context.createMediaElementSource(audio);
var analyser = context.createAnalyser();
var canvas =…

Miro Barsocchi
- 343
- 1
- 3
- 15
0
votes
1 answer
Set DelayNode to more than 1
How do I set the DelayNode.delayTime to more than 1?
I have tried this, but it results in a warning message and only creates a max delay of one second.
var delayNode = audioContext.createDelay();
delayNode.delayTime.maxValue =…

Yogsther
- 33
- 4
0
votes
2 answers
How to make a frequency sound stereo in JavaScript
I have some troubles while trying to reproduce different frequencies using two different audio channels (left and right) in JavaScript. I've been searching in StackOverflow and Internet for a while, but I didn't find anything that could help me, so…

Tupi
- 218
- 5
- 13
0
votes
0 answers
audiocontext doesn't play wav files
I am trying to learn how to use Audiocontext to give surrounding effects to my sounds.
I've spent so many hours trying to set up a simple example on jfiddle or similar and I was frustrated to the extreme, unabel to set up the simplest of examples,…

Gonzalo Goded
- 63
- 1
- 6
0
votes
1 answer
Audiocontext demo. Volume is halved on Chrome/Android, crackles on Firefox
I did a pure CSS/JS piano keyboard using the AudioContext object but I have two problems related to the playTone function:
On Chrome/android (v.89.0.4389.105/Android 10) it seems that the volume is halved at every key pressed: after a few notes…

Fabrizio Calderan
- 120,726
- 26
- 164
- 177
0
votes
1 answer
Failed to use AudioContext to make sound in JavaScript
I want to make four game buttons to make sound using AudioContext API in JavaScript. I set the onmouseclick listener to trigger startTone() method and onmouseup to trigger stopTone() method. However as I did like the tutorial, it doesn't make sound.…

Shawn Xu
- 67
- 6
0
votes
1 answer
Javascript webkitAudioContext has no playback in Safari
I'm trying to setup audio playback which I cannot get working on Safari 14.0.3, but works fine in Chrome 88.0.4324.146. I have a function that returns a AudioContext or webkitAudioContext. I followed this answer:…

Chewie The Chorkie
- 4,896
- 9
- 46
- 90
0
votes
1 answer
JavaScript: class that returns null
I'm writing a React app in which I use AudioContext. Sometimes on certain versions of Safari, calling new with AudioContext (or window.AudioContext || window.webkitAudioContext;) returns null.
I've written code that guards against this. I was…

J. Hesters
- 13,117
- 31
- 133
- 249
0
votes
3 answers
Phaser3 - Sound entries missing on Safari
I’m using in my project phaser@3.24.0 and I have a problem with games on Safari 13.1.
In my preload method I have my loadConfig object with sound data:
var data = {
mediaURL: "../../../static/sound/",
dataObjects: [
{ type: "sound", name:…

Dex
- 71
- 7
0
votes
1 answer
audioContext oscillator gets 'stuck' after one second and doesn't stop
I want to create an oscillator that starts and stops when the user presses a key (just the space bar of now). But if the key is pressed for a too long, something like one second - the oscillator gets stuck and doesn't stop();
let signal = {}
class…

ADN
- 1
0
votes
0 answers
Object doesn't support this action Web audio API not loading in Internet Explorer
I am building a website, in which there is a feature to play audio in a single ear headphone randomly, all of the code is working fine in Google Chrome, Firefox, Microsoft Edge, but not working in IE(11). I have been stuck in solving this bug but…

Haseeb Ahad
- 51
- 8