Add latencyHint=playback on audioContext

This commit is contained in:
Chrystian Huot 2020-06-09 07:53:25 -04:00
parent 7156842452
commit eb32621949

View file

@ -465,11 +465,15 @@ export class AppRdioScannerService implements OnDestroy {
const bootstrap = () => {
if (!this.audioContext) {
const options: AudioContextOptions = {
latencyHint: 'playback',
};
if ('webkitAudioContext' in window) {
this.audioContext = new webkitAudioContext();
this.audioContext = new webkitAudioContext(options);
} else {
this.audioContext = new AudioContext();
this.audioContext = new AudioContext(options);
}
}