diff options
author | Minteck <nekostarfan@gmail.com> | 2021-06-11 18:34:28 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-06-11 18:34:28 +0200 |
commit | ad2d1e6ca122cb9d87c6f18d9900caa490af97ef (patch) | |
tree | 2d58fc36c3d12f09c849efba6d7fc61768f05ad3 /views/script/core_music.js | |
parent | 0596f707fdaa36892a75ba7d2b9e8f834e7f4cfe (diff) | |
download | kartik-client-ad2d1e6ca122cb9d87c6f18d9900caa490af97ef.tar.gz kartik-client-ad2d1e6ca122cb9d87c6f18d9900caa490af97ef.tar.bz2 kartik-client-ad2d1e6ca122cb9d87c6f18d9900caa490af97ef.zip |
Music fixes (yes, after the game release)
Diffstat (limited to 'views/script/core_music.js')
-rw-r--r-- | views/script/core_music.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/script/core_music.js b/views/script/core_music.js index 4b85ebb..a35d329 100644 --- a/views/script/core_music.js +++ b/views/script/core_music.js @@ -6,7 +6,10 @@ global.musicElement = new Audio(); const musicIpc = require('electron').ipcRenderer; musicIpc.on('setmusic', (event, args) => { - if (!musicElement.paused) { + musicElement.src = args; + musicElement.play(); + musicElement.volume = 1; + /*if (!musicElement.paused) { csi1 = setInterval(() => { if (musicElement.volume <= 0.05) { clearInterval(csi1); @@ -27,7 +30,7 @@ musicIpc.on('setmusic', (event, args) => { } else { musicElement.src = args; musicElement.play(); - } + }*/ /*try { csp1.volume = 0; } catch (e) {} try { csp2.volume = 0; } catch (e) {} song = args; |