Merge pull request #1365 from Nheko-Reborn/video_improvements

Video player improvements
pull/1366/head
DeepBlueV7.X 2 years ago committed by GitHub
commit 2a28b3a343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      resources/qml/delegates/PlayableMediaMessage.qml
  2. 7
      src/ui/MxcMediaProxy.cpp

@ -59,7 +59,7 @@ Item {
Image {
anchors.fill: parent
source: thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : ""
source: thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : "image://colorimage/:/icons/icons/ui/video-file.svg?" + Nheko.colors.windowText
asynchronous: true
fillMode: Image.PreserveAspectFit

@ -21,10 +21,12 @@
#include <QTemporaryFile>
#endif
#include "ChatPage.h"
#include "EventAccessors.h"
#include "Logging.h"
#include "MatrixClient.h"
#include "timeline/TimelineModel.h"
#include "timeline/TimelineViewManager.h"
MxcMediaProxy::MxcMediaProxy(QObject *parent)
: QMediaPlayer(parent)
@ -47,6 +49,11 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
if (t == QMediaMetaData::Orientation)
emit orientationChanged();
});
connect(ChatPage::instance()->timelineManager()->rooms(),
&RoomlistModel::currentRoomChanged,
this,
&MxcMediaProxy::pause);
}
void
MxcMediaProxy::setVideoSurface(QAbstractVideoSurface *surface)

Loading…
Cancel
Save