mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix video player volume level changing
Bug: Sometimes changing of the volume level or mute/unmute has no effect. It happens because Fader::onTimer get a current volume level from the Mixer, but it gets an event about the volume modification from the settings. Bug appear when the method onTimer calling between updating of the settings and the Mixer volume. Solution: Updating the Mixer volume before the settings. (maybe will be better to get the volume level from the settings in place of the Mixer, but I am not sure about other side effects of this)
This commit is contained in:
parent
b1906a778e
commit
3af0c37c6b
2 changed files with 3 additions and 8 deletions
|
@ -1255,12 +1255,6 @@ void OverlayWidget::showSaveMsgFile() {
|
|||
File::ShowInFolder(_saveMsgFilename);
|
||||
}
|
||||
|
||||
void OverlayWidget::updateMixerVideoVolume() const {
|
||||
if (_streamed) {
|
||||
Player::mixer()->setVideoVolume(Core::App().settings().videoVolume());
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayWidget::close() {
|
||||
Core::App().hideMediaView();
|
||||
}
|
||||
|
@ -2962,9 +2956,11 @@ void OverlayWidget::playbackControlsSeekFinished(crl::time position) {
|
|||
}
|
||||
|
||||
void OverlayWidget::playbackControlsVolumeChanged(float64 volume) {
|
||||
if (_streamed) {
|
||||
Player::mixer()->setVideoVolume(volume);
|
||||
}
|
||||
Core::App().settings().setVideoVolume(volume);
|
||||
Core::App().saveSettingsDelayed();
|
||||
updateMixerVideoVolume();
|
||||
}
|
||||
|
||||
float64 OverlayWidget::playbackControlsCurrentVolume() {
|
||||
|
|
|
@ -234,7 +234,6 @@ private:
|
|||
|
||||
void refreshLang();
|
||||
void showSaveMsgFile();
|
||||
void updateMixerVideoVolume() const;
|
||||
|
||||
struct SharedMedia;
|
||||
using SharedMediaType = SharedMediaWithLastSlice::Type;
|
||||
|
|
Loading…
Add table
Reference in a new issue