[vlc-devel] [PATCH 38/49] qml: stop media when leaving the player view if the media is paused

Pierre Lamot pierre at videolabs.io
Fri Oct 11 15:18:02 CEST 2019


---
 modules/gui/qt/qml/player/TopBar.qml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/qml/player/TopBar.qml b/modules/gui/qt/qml/player/TopBar.qml
index a519095309..39d061574c 100644
--- a/modules/gui/qt/qml/player/TopBar.qml
+++ b/modules/gui/qt/qml/player/TopBar.qml
@@ -66,7 +66,12 @@ Utils.NavigableFocusScope{
                     size: VLCStyle.icon_normal
                     text: VLCIcons.exit
                     color: VLCStyle.colors.playerFg
-                    onClicked: history.previous(History.Go)
+                    onClicked: {
+                        if (player.playingState === PlayerController.PLAYING_STATE_PAUSED) {
+                           mainPlaylistController.stop()
+                        }
+                        history.previous(History.Go)
+                    }
                     KeyNavigation.right: playlistBtn
                     focus: true
                 }
-- 
2.20.1



More information about the vlc-devel mailing list