Commit cb16c12
authored
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.1 parent 6a66d42 commit cb16c12
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments