in video player, trigger muted event also if caused indirectly by setting volume to zero or turning volume up while muted
This commit is contained in:
parent
1e8edb8388
commit
d152c4b48b
1 changed files with 8 additions and 7 deletions
|
@ -1893,15 +1893,16 @@ Ox.VideoPlayer = function(options, self) {
|
|||
function setVolume(volume) {
|
||||
self.options.volume = volume;
|
||||
if (!!self.options.volume == self.options.muted) {
|
||||
self.options.muted = !self.options.muted;
|
||||
self.$video.muted(self.options.muted);
|
||||
self.$muteButton.toggleTitle();
|
||||
toggleMuted();
|
||||
} else {
|
||||
self.$volumeButton.attr({
|
||||
src: getVolumeImageURL()
|
||||
});
|
||||
self.$volumeValue.html(
|
||||
self.options.muted ? 0 : Math.round(self.options.volume * 100)
|
||||
);
|
||||
}
|
||||
!self.censored && self.$video.volume(self.options.volume);
|
||||
self.$volumeButton.attr({
|
||||
src: getVolumeImageURL()
|
||||
});
|
||||
self.$volumeValue.html(self.options.muted ? 0 : Math.round(self.options.volume * 100));
|
||||
that.triggerEvent('volume', {
|
||||
volume: self.options.volume
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue