diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/MediaPlayer.qml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 95bc22b..03c85c4 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() } } } |