Fix volume when unmuting from volume 0

This commit is contained in:
Stephane Fortin Bouchard 2020-09-28 21:35:10 -04:00
parent 11e48b0181
commit 51cb03dc32

View File

@ -278,6 +278,7 @@ const youtube = {
const toggle = is.boolean(input) ? input : muted; const toggle = is.boolean(input) ? input : muted;
muted = toggle; muted = toggle;
instance[toggle ? 'mute' : 'unMute'](); instance[toggle ? 'mute' : 'unMute']();
instance.setVolume(volume * 100);
triggerEvent.call(player, player.media, 'volumechange'); triggerEvent.call(player, player.media, 'volumechange');
}, },
}); });