aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam <me@sampotts.me>2016-04-27 00:15:29 +1000
committerSam <me@sampotts.me>2016-04-27 00:15:29 +1000
commit68c4b52dfa6a477b75e51b05a39b526641164fb6 (patch)
tree5e24965ef5874c33ee25c13846898c760ce673d1 /src/js
parent81ad9cf6f79d08ca614112f50d5ad45f20a32465 (diff)
downloadplyr-68c4b52dfa6a477b75e51b05a39b526641164fb6.tar.lz
plyr-68c4b52dfa6a477b75e51b05a39b526641164fb6.tar.xz
plyr-68c4b52dfa6a477b75e51b05a39b526641164fb6.zip
Mute volume toggle fixes
Diffstat (limited to 'src/js')
-rw-r--r--src/js/plyr.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 1cb0b199..affd649d 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1855,6 +1855,11 @@
// Set mute on the player
plyr.media.muted = muted;
+ // If volume is 0 after unmuting, set to default
+ if(plyr.media.volume === 0) {
+ _setVolume(config.volume);
+ }
+
// Embeds
if(_inArray(config.types.embed, plyr.type)) {
// YouTube
@@ -1905,9 +1910,6 @@
// Set the player volume
plyr.media.volume = parseFloat(volume / 10);
- // Store in config
- config.volume = volume;
-
// Embeds
if(_inArray(config.types.embed, plyr.type)) {
// YouTube