mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Use full volume for video messages.
Set video volume to VideoVolume in MediaView and to 1 in HistoryGif.
This commit is contained in:
@@ -229,6 +229,8 @@ bool MediaView::gifShown() const {
|
||||
auto rounding = (_doc && _doc->isRoundVideo()) ? ImageRoundRadius::Ellipse : ImageRoundRadius::None;
|
||||
_gif->start(_gif->width() / cIntRetinaFactor(), _gif->height() / cIntRetinaFactor(), _gif->width() / cIntRetinaFactor(), _gif->height() / cIntRetinaFactor(), rounding, ImageRoundCorner::All);
|
||||
const_cast<MediaView*>(this)->_current = QPixmap();
|
||||
updateMixerVideoVolume();
|
||||
Global::RefVideoVolumeChanged().notify();
|
||||
}
|
||||
return true;// _gif->state() != Media::Clip::State::Error;
|
||||
}
|
||||
@@ -647,6 +649,12 @@ void MediaView::showSaveMsgFile() {
|
||||
File::ShowInFolder(_saveMsgFilename);
|
||||
}
|
||||
|
||||
void MediaView::updateMixerVideoVolume() const {
|
||||
if (_doc && (_doc->isVideo() || _doc->isRoundVideo())) {
|
||||
Media::Player::mixer()->setVideoVolume(Global::VideoVolume());
|
||||
}
|
||||
}
|
||||
|
||||
void MediaView::close() {
|
||||
if (_menu) _menu->hideMenu(true);
|
||||
if (App::wnd()) {
|
||||
@@ -1571,6 +1579,7 @@ void MediaView::onVideoSeekFinished(TimeMs positionMs) {
|
||||
|
||||
void MediaView::onVideoVolumeChanged(float64 volume) {
|
||||
Global::SetVideoVolume(volume);
|
||||
updateMixerVideoVolume();
|
||||
Global::RefVideoVolumeChanged().notify();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user