Home > Mobile >  Play sound through JavaScript on an iPhone without interrupting the music being played
Play sound through JavaScript on an iPhone without interrupting the music being played

Time:01-01

When running audioElement.play() in a browser (safari) on an iPhone. It stops the music being played.

Is it possible to keep the music playing and have the audio ran along side the music?

CodePudding user response:

Audio can be played along side music by using AudioContext. Link to docs: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext

  • Related