This script is used by Puppeteer tests to be able to mock a browser's MediaStreams API allowing you to play multiple audio files.
The script is necessary as the Chrome flag --use-file-for-fake-audio-capture
will only allow one audio file to be chosen, and you have no control over when it will be played.
await webRtcFrame.evaluate(mockMediaDevicesScript);
webRtcFrame.evaluate(() => window.mockMediaDevice.playAudio(/* URL */));