mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Play video messages as Type::Voice.
Use AudioMsgId instead of videoPlayId. Any audio track now can be a child loader track of some video clip. Use Type::Voice instead of Type::Video for round video messages. Video messages play / pause / resume the same way as voice messages.
This commit is contained in:
@@ -145,7 +145,7 @@ void SendFilesBox::prepareGifPreview() {
|
||||
return _animated;
|
||||
};
|
||||
if (createGifPreview()) {
|
||||
_gifPreview = Media::Clip::MakeReader(FileLocation(_files.front()), QByteArray(), [this](Media::Clip::Notification notification) {
|
||||
_gifPreview = Media::Clip::MakeReader(_files.front(), [this](Media::Clip::Notification notification) {
|
||||
clipCallback(notification);
|
||||
});
|
||||
if (_gifPreview) _gifPreview->setAutoplay();
|
||||
@@ -575,7 +575,7 @@ void EditCaptionBox::prepareGifPreview(DocumentData *document) {
|
||||
};
|
||||
auto createGifPreviewResult = createGifPreview(); // Clang freeze workaround.
|
||||
if (createGifPreviewResult) {
|
||||
_gifPreview = Media::Clip::MakeReader(document->location(), document->data(), [this](Media::Clip::Notification notification) {
|
||||
_gifPreview = Media::Clip::MakeReader(document, _msgId, [this](Media::Clip::Notification notification) {
|
||||
clipCallback(notification);
|
||||
});
|
||||
if (_gifPreview) _gifPreview->setAutoplay();
|
||||
|
Reference in New Issue
Block a user