volume slider is set to previous value on reload

This commit is contained in:
2022-07-30 17:09:09 -05:00
parent bbe2e9d08e
commit 239edec1e9

View File

@@ -363,9 +363,13 @@
var track = '';
/* Load settings */
if (localStorage.getItem ('volume') !== null)
if (localStorage.getItem ('volume') !== null) {
$('audio').get (0).volume = localStorage.getItem('volume');
$('#volume-slider').slider({
value: $('audio').get (0).volume * 100
});
}
if (localStorage.getItem ('playlist') !== null) {
if (localStorage.getItem ('playlist') in PLAYLISTS)
playlist = localStorage.getItem ('playlist');