X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FMediaPlayer.qml;h=fd4db58fe980820be2f62fd5015f50c7dae86058;hb=refs%2Ftags%2Fneedlefish_13.93.0;hp=95bc22bc32bab0ec1a12326977e55cc92afacb16;hpb=219b527adbc7996f4ae2e73732114d2daa17c9c5;p=apps%2Fmediaplayer.git diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 95bc22b..fd4db58 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -96,21 +96,21 @@ ApplicationWindow { } onAuthorized: { - VehicleSignals.subscribe("Vehicle.Cabin.Infotainment.Media.Action") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Next") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Previous") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Mode") } onSignalNotification: { - if (path === "Vehicle.Cabin.Infotainment.Media.Action") { - if (value == "SkipForward") { - mediaplayer.next() - } else if (value == "SkipBackward") { - mediaplayer.previous() - } else if (value == "NextSource") { - if (player.av_connected) - mediaplayer.connect() - else - mediaplayer.disconnect() - } + if (path === "Vehicle.Cabin.SteeringWheel.Switches.Next" && value === "true") { + mediaplayer.next() + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.Previous" && value === "true") { + mediaplayer.previous() + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.Mode" && value === "true") { + if (player.av_connected) + mediaplayer.connect() + else + mediaplayer.disconnect() } } } @@ -140,17 +140,19 @@ ApplicationWindow { Layout.fillHeight: true Layout.preferredHeight: 1080 clip: true + Image { + anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - anchors.bottom: parent.bottom - height: sourceSize.height * width / sourceSize.width - fillMode: Image.PreserveAspectCrop + anchors.bottom: controls.top + fillMode: Image.PreserveAspectFit source: AlbumArt visible: player.av_connected === false } Item { + id: controls anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom @@ -292,7 +294,7 @@ ApplicationWindow { Item { Layout.fillWidth: true Layout.fillHeight: true - Layout.preferredHeight: 407 + Layout.preferredHeight: 480 ListView { anchors.fill: parent