use native player to open video files #LINQT-2116

hide e2e conf creation toggle #LINQT-2112
This commit is contained in:
Gaelle Braud 2025-11-06 16:43:02 +01:00 committed by Gaëlle Braud
parent d957fae94e
commit b3b40d6f99
4 changed files with 12 additions and 19 deletions

View file

@ -102,17 +102,6 @@ Item {
position: 100
source: mainItem.isVideo ? "file:///" + mainItem.filePath : ""
fillMode: playbackState === MediaPlayer.PlayingState ? VideoOutput.PreserveAspectFit : VideoOutput.PreserveAspectCrop
MouseArea {
propagateComposedEvents: false
enabled: videoThumbnail.visible
anchors.fill: parent
hoverEnabled: false
acceptedButtons: Qt.LeftButton
onClicked: (mouse) => {
mouse.accepted = true
videoThumbnail.playbackState === MediaPlayer.PlayingState ? videoThumbnail.pause() : videoThumbnail.play()
}
}
EffectImage {
anchors.centerIn: parent
visible: videoThumbnail.playbackState !== MediaPlayer.PlayingState

View file

@ -26,10 +26,6 @@ Image {
fillMode: Image.PreserveAspectFit
source: contentGui && contentGui.core.thumbnail || ""
states: State {
name: 'hovered'
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
@ -40,7 +36,6 @@ Image {
onContainsMouseChanged: {
if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor)
else UtilsCpp.restoreGlobalCursor()
mainItem.state = containsMouse ? 'hovered' : ''
}
onPressed: (mouse) => {
mouse.accepted = true

View file

@ -17,6 +17,7 @@ Rectangle {
property var fillMode: playbackState === MediaPlayer.PlayingState ? VideoOutput.PreserveAspectFit : VideoOutput.PreserveAspectCrop
property alias videoOutput: output
property string source: mediaPlayer.source
MediaPlayer {
id: mediaPlayer
source: UtilsCpp.isVideo(mainItem.filePath) ? "file:///" + mainItem.filePath : ""
@ -54,11 +55,18 @@ Rectangle {
propagateComposedEvents: false
enabled: mainItem.visible
anchors.fill: parent
hoverEnabled: false
hoverEnabled: true
acceptedButtons: Qt.LeftButton
onClicked: (mouse) => {
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
// Changing cursor in MouseArea seems not to work with the Loader
// Use override cursor for this case
onContainsMouseChanged: {
if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor)
else UtilsCpp.restoreGlobalCursor()
}
onPressed: (mouse) => {
mouse.accepted = true
mediaPlayer.playbackState === MediaPlayer.PlayingState ? mediaPlayer.pause() : mediaPlayer.play()
mainItem.contentGui.core.lOpenFile()
}
}
EffectImage {

View file

@ -137,6 +137,7 @@ AbstractSettingsLayout {
propertyOwner: SettingsCpp
}
SwitchSetting {
visible: false
Layout.fillWidth: true
//: Create end to end encrypted meetings and group calls
titleText: qsTr("settings_advanced_create_endtoend_encrypted_meetings_title")