leoasis / react-sound

Sound component to play audio in your web apps
ISC License
491 stars 80 forks source link

External sounds are prevented in background [Mobile Firefox, Mobile Safari] #90

Open kharissa opened 4 years ago

kharissa commented 4 years ago

(Let me know if I should post this issue in SoundManager2 instead.)

The sound in our app is playing as expected, however users on certain environments (Firefox on Android and Safari on iOS Mobile specifically) have reported their background music (e.g. Spotify) to stop playing in the background when our sound is played. We have already implemented the following in App.js but the problem persists:

function App() {
  window.soundManager.setup({ debugMode: false, ignoreMobileRestrictions: true });
  return (
    // ...
  );
}

Is there anything else that I should be looking at? Is there a different way to implement the above?