admin管理员组

文章数量:1426220

Since I upgraded to ios17 my AudioContext is not working on Safari.

I have a simple element that I connect a gain node through AudioContext. The audio loads the .mp3 file (remaining time is updated correctly). But when I press play, nothing happens. No error in the console

 audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
gainNode.gain.value = 2;
const sourceNode = audioCtx.createMediaElementSource(audio);
sourceNode.connect(gainNode);
gainNode.connect(audioCtx.destination);

Since I upgraded to ios17 my AudioContext is not working on Safari.

I have a simple element that I connect a gain node through AudioContext. The audio loads the .mp3 file (remaining time is updated correctly). But when I press play, nothing happens. No error in the console

 audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
gainNode.gain.value = 2;
const sourceNode = audioCtx.createMediaElementSource(audio);
sourceNode.connect(gainNode);
gainNode.connect(audioCtx.destination);

Share Improve this question asked Sep 19, 2023 at 19:48 danborddanbord 4,1063 gold badges37 silver badges52 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

It sounds like you ran into this bug (https://bugs.webkit/show_bug.cgi?id=261414). It got marked as fixed but seems not to be shipped yet.

本文标签: javascriptios17 safari AudioContext (Web Audio API) problemStack Overflow