mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-18 07:12:15 +00:00
Put blop sound into separate function and only play if on desktop
This commit is contained in:
@@ -62,6 +62,24 @@ window.isMobile = window.iOS || window.android;
|
||||
|
||||
|
||||
// Helper functions
|
||||
|
||||
const audioPlayer = (() => {
|
||||
const blop = document.getElementById('blop');
|
||||
blop.addEventListener('ended', _ => {
|
||||
blop.muted = true
|
||||
});
|
||||
|
||||
|
||||
return {
|
||||
playBlop() {
|
||||
if (window.isMobile) return;
|
||||
|
||||
blop.muted = false;
|
||||
blop.play();
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
const zipper = (() => {
|
||||
|
||||
let zipWriter;
|
||||
|
||||
Reference in New Issue
Block a user