From b5543c0c4646a35e67edaa3779e7ba46cda28c92 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 25 Sep 2022 14:59:04 -0500 Subject: [PATCH] fix mpv showing overtop with audio cover art --- src/mpv/mpvobject.cpp | 2 +- src/qml/presenter/Slide.qml | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mpv/mpvobject.cpp b/src/mpv/mpvobject.cpp index e441333..e2f40a4 100644 --- a/src/mpv/mpvobject.cpp +++ b/src/mpv/mpvobject.cpp @@ -267,7 +267,7 @@ void MpvObject::doUpdate() void MpvObject::command(const QVariant& params) { - // qDebug() << params; + qDebug() << params; mpv::qt::command(mpv, params); } diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index 9973bb0..d3bfa10 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -112,6 +112,9 @@ Item { id: mpvAudio useHwdec: true enableAudio: true + // embeded mpv allows to set commandline propertys using the options/ + // syntax. This could be abstracted later, but for now this works. + Component.onCompleted: mpvAudio.setProperty("options/audio-display", "no"); } Controls.Label { @@ -175,16 +178,7 @@ Item { } function playAudio() { - audio.stop(); - audio.source = audioSource; mpvAudio.loadFile(audioSource.toString()); - audio.play(); - showPassiveNotification("We should be playing: " + audio.source) - showPassiveNotification(audio.status) - showPassiveNotification(audio.hasAudio) - showPassiveNotification(audio.duration) - showPassiveNotification(audio.errors) - showPassiveNotification(audio.errorString) } function stopVideo() {