Support animated images

fixes #461
This commit is contained in:
Nicolas Werner 2021-08-29 05:20:23 +02:00
parent 09c041c8ac
commit ef068ac2b3
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
8 changed files with 293 additions and 33 deletions

View file

@ -91,11 +91,11 @@ MxcMediaProxy::startDownload()
buffer.open(QIODevice::ReadOnly);
buffer.reset();
QTimer::singleShot(0, this, [this, self, filename] {
QTimer::singleShot(0, this, [this, filename] {
nhlog::ui()->info("Playing buffer with size: {}, {}",
buffer.bytesAvailable(),
buffer.isOpen());
self->setMedia(QMediaContent(filename.fileName()), &buffer);
this->setMedia(QMediaContent(filename.fileName()), &buffer);
emit loadedChanged();
});
};