summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-03-15 15:51:10 +0000
committerGitHub <noreply@github.com>2021-03-15 15:51:10 +0000
commit6548b84e2934dd76c59b87be10f729e2fc9b6f2a (patch)
treeea5b7ec67143269ae968bcf23b8eda1d765366b6
parentRotate session keys properly (diff)
parentprepend file:// for linux and macos (diff)
downloadnheko-6548b84e2934dd76c59b87be10f729e2fc9b6f2a.tar.xz
Merge pull request #523 from Jedi18/master
Fix windows video bug
-rw-r--r--README.md7
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml2
-rw-r--r--src/timeline/TimelineModel.cpp8
3 files changed, 16 insertions, 1 deletions
diff --git a/README.md b/README.md

index a857a0a1..ee8c114e 100644 --- a/README.md +++ b/README.md
@@ -114,6 +114,13 @@ with [homebrew](https://brew.sh/): ```sh brew install --cask nheko ``` +### FAQ + +## +**Q:** Why don't videos run for me on Windows? + +**A:** You're probably missing the required video codecs, download [K-Lite Codec Pack](https://codecguide.com/download_kl.htm). +## ### Build Requirements diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index f871e492..52277895 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -185,7 +185,7 @@ Rectangle { target: TimelineManager.timeline onMediaCached: { if (mxcUrl == model.data.url) { - media.source = "file://" + cacheUrl; + media.source = cacheUrl; button.state = "stopped"; console.log("media loaded: " + mxcUrl + " at " + cacheUrl); } diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index ddec7287..6134262e 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1246,7 +1246,11 @@ TimelineModel::cacheMedia(QString eventId, std::function<void(const QString)> ca QDir().mkpath(filename.path()); if (filename.isReadable()) { +#if defined(Q_OS_WIN) emit mediaCached(mxcUrl, filename.filePath()); +#else + emit mediaCached(mxcUrl, "file://" + filename.filePath()); +#endif if (callback) { callback(filename.filePath()); } @@ -1288,7 +1292,11 @@ TimelineModel::cacheMedia(QString eventId, std::function<void(const QString)> ca nhlog::ui()->warn("Error while saving file to: {}", e.what()); } +#if defined(Q_OS_WIN) emit mediaCached(mxcUrl, filename.filePath()); +#else + emit mediaCached(mxcUrl, "file://" + filename.filePath()); +#endif }); }