[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: do not open mini player just to close it immediately
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Jul 30 16:24:56 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fd5c43af by Fatih Uzunoglu at 2026-07-30T16:15:16+00:00
qml: do not open mini player just to close it immediately
When we play video, we automatically open the player page,
but the binding that decides on whether the mini player
should be open or not depends on player's `isStarted`,
which becomes true before we know that there is video
content. This causes mini player to open just before we
unload the main view page (to load the player page).
Granted, this has an input lag side effect in audio cases,
but that can be considered negligible. The advantage of
this would be to prevent twitching (mini player opens
and becomes immediately obsolete with the player page),
and also not consume cpu cycles where it would be necessary
to open the player page (so in a way, it decreases input
lag with video content).
The original binding remains for initial state determination.
- - - - -
8c00e6a8 by Fatih Uzunoglu at 2026-07-30T16:15:16+00:00
qml: do not open pip player just to close it immediately
When we play video, we automatically open the player page,
but the binding that decides on whether the mini player
should be open or not depends on the same condition (if
there is embedded video) where we open the player page.
QML engine does not specify the order of evaluation of
independent bindings, so the engine may decide to adjust
the visibility binding of pip player before we handle
the change signal (when change signal is emitted).
Pip player becomes irrelevant in player page, so not only
it is pointless to show it, but it makes loading the
player page slower by consuming CPU cycles (increasing
the input lag), and causes visual twitching.
The original binding remains for initial state determination.
- - - - -
2 changed files:
- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/player/qml/MiniPlayer.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -946,6 +946,17 @@ FocusScope {
visible: g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
enabled: g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
+ Binding on visible {
+ id: visibleBinding
+ when: false
+ delayed: true
+ value: g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
+ }
+
+ Component.onCompleted: {
+ Qt.callLater(() => { visibleBinding.when = true })
+ }
+
dragXMin: VLCStyle.applicationHorizontalMargin
dragXMax: g_mainDisplay.width - playerPip.width - VLCStyle.applicationHorizontalMargin
dragYMin: localTopbar.y + localTopbar.height
=====================================
modules/gui/qt/player/qml/MiniPlayer.qml
=====================================
@@ -35,6 +35,18 @@ ControlBar {
state: Player.isStarted ? "inViewport"
: "outViewport"
+ Binding on state {
+ id: stateBinding
+ when: false
+ delayed: true
+ value: Player.isStarted ? "inViewport"
+ : "outViewport"
+ }
+
+ Component.onCompleted: {
+ Qt.callLater(() => { stateBinding.when = true })
+ }
+
textPosition: (MainCtx.pinVideoControls) ? ControlBar.TimeTextPosition.LeftRightSlider
: ControlBar.TimeTextPosition.Hide
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/41c538c685bf5b03dc3850b7852964fafd6120bd...8c00e6a8085f785a4548b0ee0cbabcd16b7b8701
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/41c538c685bf5b03dc3850b7852964fafd6120bd...8c00e6a8085f785a4548b0ee0cbabcd16b7b8701
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list