vlc | branch: master | Adrien Maglo <[email protected]> | Mon Jun 17 18:57:21 2019 +0200| [5d477453d468f102ae78f24d56b2371fb3a7b3da] | committer: Jean-Baptiste Kempf
QML: mini-player and full-player mode selection Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d477453d468f102ae78f24d56b2371fb3a7b3da --- modules/gui/qt/qml/MainInterface.qml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/modules/gui/qt/qml/MainInterface.qml b/modules/gui/qt/qml/MainInterface.qml index abe9de7c64..4fe998795a 100644 --- a/modules/gui/qt/qml/MainInterface.qml +++ b/modules/gui/qt/qml/MainInterface.qml @@ -124,23 +124,19 @@ Rectangle { focus: true Connections { - target: player - onPlayingStateChanged: { - console.log("onPlayingStateChanged", state) - if (state === PlayerController.PLAYING_STATE_STOPPED) - loadCurrentHistoryView() - else { - console.log(player.hasVideoOutput, history.current.view !== "player") - if (player.hasVideoOutput && history.current.view !== "player") + target: player.videoTracks + + onDataChanged: { + var nbVideoTracks = player.videoTracks.rowCount() + + if (nbVideoTracks > 0) { + if (history.current.view !== "player") history.push(["player"], History.Go) } - } - - onHasVideoOutputChanged: { - console.log("before push player", player.hasVideoOutput) - if (player.hasVideoOutput) { - console.log("push player") - history.push(["player"], History.Go) + else { + console.log("go previous", history.current.view) + if (history.current.view === "player") + history.previous(History.Go) } } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
