Skip to content

Commit 20a8469

Browse files
Fix: Lockscreen crash when using gstreamer (#172)
* Fix: Lockscreen crash when using gstreamer * use a binding instead of having to call next --------- Co-authored-by: Luis Bocanegra <[email protected]>
1 parent 6f3c5eb commit 20a8469

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package/contents/ui/FadePlayer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "code/enum.js" as Enum
88

99
Item {
1010
id: root
11-
property var currentSource
11+
property var currentSource: Utils.createVideo("")
1212
property real volume: 1.0
1313
property bool muted: true
1414
property real playbackRate: 1

package/contents/ui/main.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ WallpaperItem {
241241
FadePlayer {
242242
id: player
243243
anchors.fill: parent
244-
currentSource: main.currentSource
245244
muted: main.muteAudio
246245
lastVideoPosition: main.configuration.LastVideoPosition
247246
onSetNextSource: {
@@ -356,6 +355,11 @@ WallpaperItem {
356355

357356
Component.onCompleted: {
358357
startTimer.start();
358+
Qt.callLater(() => {
359+
player.currentSource = Qt.binding(() => {
360+
return main.currentSource;
361+
});
362+
});
359363
}
360364

361365
function save() {

0 commit comments

Comments
 (0)