mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Added play button for recorded voice data.
This commit is contained in:
@@ -483,7 +483,7 @@ void MainWidget::floatPlayerClosed(FullMsgId itemId) {
|
||||
const auto voiceData = Media::Player::instance()->current(
|
||||
AudioMsgId::Type::Voice);
|
||||
if (voiceData.contextId() == itemId) {
|
||||
_player->entity()->stopAndClose();
|
||||
stopAndClosePlayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -882,6 +882,12 @@ void MainWidget::closeBothPlayers() {
|
||||
Shortcuts::ToggleMediaShortcuts(false);
|
||||
}
|
||||
|
||||
void MainWidget::stopAndClosePlayer() {
|
||||
if (_player) {
|
||||
_player->entity()->stopAndClose();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::createPlayer() {
|
||||
if (!_player) {
|
||||
_player.create(
|
||||
|
Reference in New Issue
Block a user