mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Merge pull request #1365 from Nheko-Reborn/video_improvements
Video player improvements
This commit is contained in:
commit
2a28b3a343
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,7 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent
|
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
|
asynchronous: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,12 @@
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ChatPage.h"
|
||||||
#include "EventAccessors.h"
|
#include "EventAccessors.h"
|
||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
#include "MatrixClient.h"
|
#include "MatrixClient.h"
|
||||||
#include "timeline/TimelineModel.h"
|
#include "timeline/TimelineModel.h"
|
||||||
|
#include "timeline/TimelineViewManager.h"
|
||||||
|
|
||||||
MxcMediaProxy::MxcMediaProxy(QObject *parent)
|
MxcMediaProxy::MxcMediaProxy(QObject *parent)
|
||||||
: QMediaPlayer(parent)
|
: QMediaPlayer(parent)
|
||||||
|
@ -47,6 +49,11 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
|
||||||
if (t == QMediaMetaData::Orientation)
|
if (t == QMediaMetaData::Orientation)
|
||||||
emit orientationChanged();
|
emit orientationChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ChatPage::instance()->timelineManager()->rooms(),
|
||||||
|
&RoomlistModel::currentRoomChanged,
|
||||||
|
this,
|
||||||
|
&MxcMediaProxy::pause);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
MxcMediaProxy::setVideoSurface(QAbstractVideoSurface *surface)
|
MxcMediaProxy::setVideoSurface(QAbstractVideoSurface *surface)
|
||||||
|
|
Loading…
Reference in a new issue