summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/display.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 380134ad..90fd1037 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -807,9 +807,10 @@ class Display {
this._stopPlayingAudio();
+ const volume = Math.max(0.0, Math.min(1.0, this.options.audio.volume / 100.0));
this.audioPlaying = audio;
audio.currentTime = 0;
- audio.volume = this.options.audio.volume / 100.0;
+ audio.volume = Number.isFinite(volume) ? volume : 1.0;
const playPromise = audio.play();
if (typeof playPromise !== 'undefined') {
try {