Add start call to QML 53/27253/1 12.93.0 marlin/12.93.0 marlin_12.93.0
authorScott Murray <scott.murray@konsulko.com>
Tue, 8 Mar 2022 20:25:26 +0000 (15:25 -0500)
committerScott Murray <scott.murray@konsulko.com>
Tue, 8 Mar 2022 20:30:15 +0000 (15:30 -0500)
Tweak the app QML to call into the new start call in the libqtappfw
Mediaplayer object that replaces the previous WebSocket onConnected
hook.  This is driven by the need to hold off triggering events from
the underlying libqtappfw Bluetooth object until the QML engine is
running, otherwise it misses events driven by bluez-glib
initialization querying BlueZ state.

Bug-AGL: SPEC-4231

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ia4c98a19c73aaf778d4133ef77d93bfdacdf7974

app/MediaPlayer.qml

index 94281f5..177fe36 100644 (file)
@@ -46,6 +46,11 @@ ApplicationWindow {
         }
     }
 
+    Component.onCompleted : {
+        // Let the mediaplayer backend know we're ready for metadata events
+        mediaplayer.start()
+    }
+
     Connections {
         target: mediaplayer