From 66db7107616ee68dce826daf0915bcfc6501e064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgardo=20Ram=C3=ADrez?= Date: Tue, 6 Oct 2020 15:03:15 -0500 Subject: [PATCH] FIX: Set volume only if it exists in localstorage --- webroot/js/components/player.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webroot/js/components/player.js b/webroot/js/components/player.js index 4d651d7e2..8e6191131 100644 --- a/webroot/js/components/player.js +++ b/webroot/js/components/player.js @@ -80,7 +80,9 @@ class OwncastPlayer { startPlayer() { this.log('Start playing'); const source = { ...VIDEO_SRC }; - this.vjsPlayer.volume(localStorage.getItem('owncastVolume')); + + if (localStorage.getItem('owncastVolume') !== null) + this.vjsPlayer.volume(localStorage.getItem('owncastVolume')); this.vjsPlayer.src(source); // this.vjsPlayer.play(); }