aboutsummaryrefslogtreecommitdiff
path: root/views/script/core_music.js
diff options
context:
space:
mode:
Diffstat (limited to 'views/script/core_music.js')
-rw-r--r--views/script/core_music.js7
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;