mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Add latencyHint=playback on audioContext
This commit is contained in:
parent
7156842452
commit
eb32621949
|
|
@ -465,11 +465,15 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
|
|
||||||
const bootstrap = () => {
|
const bootstrap = () => {
|
||||||
if (!this.audioContext) {
|
if (!this.audioContext) {
|
||||||
|
const options: AudioContextOptions = {
|
||||||
|
latencyHint: 'playback',
|
||||||
|
};
|
||||||
|
|
||||||
if ('webkitAudioContext' in window) {
|
if ('webkitAudioContext' in window) {
|
||||||
this.audioContext = new webkitAudioContext();
|
this.audioContext = new webkitAudioContext(options);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.audioContext = new AudioContext();
|
this.audioContext = new AudioContext(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue