From 73e80fab23945270f58285cfab714f25ec72da5b Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 2 Nov 2022 14:56:06 +0800 Subject: [PATCH] add audio volume set --- themes/googleimage/views/site/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/themes/googleimage/views/site/index.php b/themes/googleimage/views/site/index.php index 7b102d3..e3fb748 100644 --- a/themes/googleimage/views/site/index.php +++ b/themes/googleimage/views/site/index.php @@ -142,6 +142,7 @@ function playMusic() { try { if (mp3.paused) { mp3.play(); + mp3.volume = 0.5; playingBtn.className = playingBtn.className.replace(' hide', ''); pausedBtn.className = pausedBtn.className.replace(' hide', '') + ' hide'; }else { @@ -158,6 +159,7 @@ function detectMusicAutoPlaying() { pausedBtn = document.getElementById('btn_paused'); try { if (!mp3.paused) { + mp3.volume = 0.5; playingBtn.className = pausedBtn.className.replace(' hide', ''); pausedBtn.className = playingBtn.className.replace(' hide', '') + ' hide'; if (typeof(timer) != 'undefined') {clearInterval(timer);}