Replace the desktop video path with OWE

The desktop background no longer plays videos. OWE owns video
backgrounds, and the shell layer stays empty behind one. The shell keeps
stills, which OWE hands back to it.

Remove the desktop video pause plumbing that only existed to stop an
unseen player: the lock, idle, and battery service lookups, the
per-output fullscreen check, the first-screen audio opt-in, and the audio
output in BackgroundVideo. The lock screen keeps its own silent playback.

Update the background tests, the manual, and the package note.
This commit is contained in:
Bjarne Oeverli committed 2026-09-18 18:46:17 +02:00
1 parent 02bb92bc74
commit dbebc458db
6 files changed
+37 -119

No files matched your search

+5 -14
View File
@@ -7,11 +7,9 @@ Item {
property string path: ""
property int version: 0
property bool playbackEnabled: true
property bool audioEnabled: false
// The desktop yields video playback to OWE while it runs, so two engines
// never decode the same file. The lock screen leaves this off and keeps its
// own playback.
property bool deferVideo: false
// The desktop turns this off because OWE owns video backgrounds. The lock
// screen leaves it on and keeps its own playback.
property bool videoEnabled: true
// Bumped when the file behind an unchanged path may have been replaced.
// Images cache-bust through version; a video is rebuilt, since FFmpeg
// would read a query as part of the filename.
@@ -27,7 +25,7 @@ Item {
// Both test the path directly: going through `video` lets a URL evaluate
// against the stale flag and leak the wrong file for one pass.
readonly property url imageUrl: path && !Util.isVideoPath(path) ? Util.fileUrl(path) + (version ? "?v=" + version : "") : ""
readonly property url videoUrl: path && Util.isVideoPath(path) ? Util.fileUrl(path) : ""
readonly property url videoUrl: path && Util.isVideoPath(path) && videoEnabled ? Util.fileUrl(path) : ""
Loader {
id: imageLoader
@@ -41,7 +39,7 @@ Item {
Loader {
id: videoLoader
anchors.fill: parent
active: root.path !== "" && root.video && !root.reloading && !root.deferVideo
active: root.path !== "" && root.video && !root.reloading && root.videoEnabled
source: "BackgroundVideo.qml"
}
@@ -68,13 +66,6 @@ Item {
when: videoLoader.item !== null
}
Binding {
target: videoLoader.item
property: "audioEnabled"
value: root.audioEnabled
when: videoLoader.item !== null
}
Component {
id: imageComponent
+6 -17
View File
@@ -1,15 +1,15 @@
import QtQuick
import QtMultimedia
// Deliberately a bare MediaPlayer and VideoOutput rather than the Video
// convenience type: Video always builds an AudioOutput, and a muted sink still
// decodes the audio stream and opens an audio client on every output.
// The lock screen is the only user. Playback is always silent, so this is a
// bare MediaPlayer and VideoOutput rather than the Video convenience type:
// Video always builds an AudioOutput, and a muted sink still decodes the audio
// stream and opens an audio client.
Item {
id: root
property url mediaSource: ""
property bool playbackEnabled: true
property bool audioEnabled: false
property int mediaGeneration: 0
property bool priming: false
property int primingGeneration: -1
@@ -74,23 +74,12 @@ Item {
fillMode: VideoOutput.PreserveAspectCrop
}
// Sound is opted into per output: with a player per monitor, every output
// playing the track would layer copies of it. The sink is only built once
// the media reports a sound track, so a silent file never opens an audio
// client or its threads. Priming a paused player must not be heard.
Loader {
id: audioLoader
active: root.audioEnabled && player.hasAudio
sourceComponent: AudioOutput {
muted: root.priming || !root.playbackEnabled
}
}
// No audio output is built, so the lock never decodes an audio stream or
// opens an audio client.
MediaPlayer {
id: player
source: root.mediaSource
videoOutput: output
audioOutput: audioLoader.item
loops: MediaPlayer.Infinite
autoPlay: root.playbackEnabled
onMediaStatusChanged: {