In my web app, an MP3 is playing through the speaker.
When I call getUserMedia() API to capture audio, the audio will correctly switcher to the earpiece — which is
expected.
However, after releasing the MediaStream(stop the audio track), this MP3 continues to play through the earpiece
instead of switching back to the speaker.
Environment: iPhone 15 Pro Max (iOS 18.5, Safari)
Reference: WebKit Bug #295889