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) {
|
function setVolume(volume) {
|
||||||
self.options.volume = volume;
|
self.options.volume = volume;
|
||||||
if (!!self.options.volume == self.options.muted) {
|
if (!!self.options.volume == self.options.muted) {
|
||||||
self.options.muted = !self.options.muted;
|
toggleMuted();
|
||||||
self.$video.muted(self.options.muted);
|
} else {
|
||||||
self.$muteButton.toggleTitle();
|
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.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', {
|
that.triggerEvent('volume', {
|
||||||
volume: self.options.volume
|
volume: self.options.volume
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue