Show speed control in media viewer only when supported

This commit is contained in:
Ilya Fedin 2023-03-12 15:26:22 +04:00 committed by John Preston
parent e9f5f0c948
commit 2eaa66e873

View file

@ -362,7 +362,7 @@ void PlaybackControls::showMenu() {
_menu.emplace(this, _menuStyle);
{
if (Media::Audio::SupportsSpeedControl()) {
auto speedItem = base::make_unique_q<MenuSpeedItem>(
_menu,
_menuStyle.menu,
@ -372,10 +372,9 @@ void PlaybackControls::showMenu() {
updatePlaybackSpeed(speed);
}, speedItem->lifetime());
_menu->addAction(std::move(speedItem));
_menu->addSeparator();
}
_menu->addSeparator();
_menu->addAction(tr::lng_mediaview_rotate_video(tr::now), [=] {
_delegate->playbackControlsRotate();
});