Integrate NeoChatMaximizeComponent with MediaManger
Needs libraries/kirigami-addons!227 Closes network/neochat#641
This commit is contained in:
@@ -5,6 +5,7 @@ import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
import Qt.labs.platform as Platform
|
||||
import QtMultimedia
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.labs.components as Components
|
||||
@@ -34,6 +35,22 @@ Components.AlbumMaximizeComponent {
|
||||
}
|
||||
}
|
||||
|
||||
playAction: Kirigami.Action {
|
||||
onTriggered: {
|
||||
MediaManager.startPlayback();
|
||||
currentItem.play();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: MediaManager
|
||||
function onPlaybackStarted() {
|
||||
if (currentItem.playbackState === MediaPlayer.PlayingState) {
|
||||
currentItem.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: currentRoom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user