aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 637a267c..6066fcff 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -107,7 +107,7 @@
},
storage: {
enabled: true,
- key: 'plyr_volume'
+ key: 'plyr'
},
controls: ['restart', 'rewind', 'play', 'fast-forward', 'current-time', 'duration', 'mute', 'volume', 'captions', 'fullscreen'],
i18n: {
@@ -1869,11 +1869,15 @@
if (config.storage.enabled && _storage().supported) {
volume = window.localStorage.getItem(config.storage.key);
+
+ // Clean up old volume
+ // https://github.com/Selz/plyr/issues/171
+ window.localStorage.removeItem('plyr-volume');
}
}
// Use config if all else fails
- if(isNaN(volume)) {
+ if(volume === null || isNaN(volume)) {
volume = config.volume;
}