最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ios17 safari AudioContext (Web Audio API) problem - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论