mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-05-12 03:23:24 +08:00
Compare commits
No commits in common. "d4a2c38484d52ff79b2c17846f395991205dabf5" and "f014befbbdbcf67566c9df485831e43e77c4eb78" have entirely different histories.
d4a2c38484
...
f014befbbd
@ -35,16 +35,6 @@ export class AudioPlayer extends EventEmitter<AudioPlayerEvent> {
|
||||
this.ac = new AudioContext();
|
||||
this.gain = this.ac.createGain();
|
||||
this.gain.connect(this.ac.destination);
|
||||
|
||||
const func = () => {
|
||||
this.ac.resume();
|
||||
document.body.removeEventListener('mousedown', func);
|
||||
document.body.removeEventListener('touchstart', func);
|
||||
document.body.removeEventListener('keydown', func);
|
||||
};
|
||||
document.body.addEventListener('mousedown', func, { capture: true });
|
||||
document.body.addEventListener('touchstart', func, { capture: true });
|
||||
document.body.addEventListener('keydown', func, { capture: true });
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user