[vlc-commits] qml: stop video when leaving the player if the media has a video out

Pierre Lamot git at videolan.org
Fri Jan 10 15:06:52 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Dec 23 12:52:20 2019 +0100| [5c58b94cf60516616d92c8aae43af50bd60ae3b7] | committer: Jean-Baptiste Kempf

qml: stop video when leaving the player if the media has a video out

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c58b94cf60516616d92c8aae43af50bd60ae3b7
---

 modules/gui/qt/player/qml/Player.qml | 2 +-
 modules/gui/qt/player/qml/TopBar.qml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index eee49b03a0..333a84e6db 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -53,7 +53,7 @@ Widgets.NavigableFocusScope {
             toolbarAutoHide.toggleForceVisible()
         } else if (KeyHelper.matchCancel(event)) {
 
-            if (player.playingState === PlayerController.PLAYING_STATE_PAUSED) {
+            if (player.hasVideoOutput) {
                mainPlaylistController.stop()
             }
             history.previous(History.Go)
diff --git a/modules/gui/qt/player/qml/TopBar.qml b/modules/gui/qt/player/qml/TopBar.qml
index bd10233b21..fcc9dc4f79 100644
--- a/modules/gui/qt/player/qml/TopBar.qml
+++ b/modules/gui/qt/player/qml/TopBar.qml
@@ -72,7 +72,7 @@ Widgets.NavigableFocusScope{
                     text: i18n.qtr("Back")
                     color: VLCStyle.colors.playerFg
                     onClicked: {
-                        if (player.playingState === PlayerController.PLAYING_STATE_PAUSED) {
+                        if (player.hasVideoOutput) {
                            mainPlaylistController.stop()
                         }
                         history.previous(History.Go)



More information about the vlc-commits mailing list