Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: Change the default value of iOS audio context to force speakers (…
…#1363) There has been a high number of issues being opened around the fact that on 1.0.0, forceSpeaker on iOS (and android) was set to false by default, requiring most users to explicitly setup the global audio context. This change the default value of iOS audio context to force speakers to be inline with what users seem to expect. Follow this thread for details. Since I only test iOS on emulators, where this setting doesn't make any difference, I hadn't realized this issue. Note: this changes the default for android as well, which is in line with the unified audio context philosophy. Migration instructions If you wanted to have it set to false, you can just set it so: final AudioContext audioContext = AudioContext( iOS: AudioContextIOS( defaultToSpeaker: false, // ... ), // ... ); AudioPlayer.global.setGlobalAudioContext(audioContext); If not, you can remove all the ad-hoc code you had to set this up.
- Loading branch information