getting audio into the slide.. still not playing yet though

This commit is contained in:
Chris Cochrun 2022-09-25 07:09:00 -05:00
parent 3232dd4ab7
commit 7f94cc37e7
5 changed files with 23 additions and 13 deletions

View file

@ -221,6 +221,7 @@ Item {
dragItemType = "song";
dragItemBackgroundType = backgroundType;
dragItemBackground = background;
dragItemAudio = audio;
draggedLibraryItem = self;
} else {
songListItem.Drag.drop()

View file

@ -25,6 +25,7 @@ Controls.Page {
property string dragItemTitle: ""
property string dragItemType: ""
property string dragItemText: ""
property string dragItemAudio: ""
property string dragItemBackgroundType: ""
property string dragItemBackground: ""
@ -139,7 +140,6 @@ Controls.Page {
print("Time to start changing");
SlideObject.changeSlide(item);
showPassiveNotification(SlideObject.imageBackground);
/* if (item.backgroundType === "video") */
/* { */
@ -149,7 +149,6 @@ Controls.Page {
presentation.textIndex = 0;
/* presentation.changeSlide(); */
showPassiveNotification(SlideObject.imageBackground);
print("Slide changed to: " + item.name);
}

View file

@ -90,6 +90,7 @@ Item {
itemType: root.itemType
imageSource: imagebackground
videoSource: vidbackground
audioSource: SlideObject.audio
text: SlideObject.text
pdfIndex: SlideObject.pdfIndex
preview: true
@ -212,6 +213,7 @@ Item {
if (changed) {
currentServiceItem--;
loadVideo();
/* playAudio(); */
leftDock.changeItem();
}
}

View file

@ -44,6 +44,7 @@ ColumnLayout {
dragItemBackground,
dragItemBackgroundType,
dragItemText,
dragItemAudio,
dragItemIndex);
dropHighlightLine.visible = false;
}
@ -121,6 +122,7 @@ ColumnLayout {
dragItemBackground,
dragItemBackgroundType,
dragItemText,
dragItemAudio,
dragItemIndex);
} else if (drag.keys[0] === "serviceitem") {
serviceItemModel.move(serviceItemList.indexDragged,
@ -229,7 +231,7 @@ ColumnLayout {
}
onDoubleClicked: {
showPassiveNotification("Double Clicked")
/* showPassiveNotification("Double Clicked") */
serviceItemList.currentIndex = index;
currentServiceItem = index;
changeServiceItem(index);
@ -408,7 +410,7 @@ ColumnLayout {
print("adding: " + name + " of type " + type);
serviceItemModel.insertItem(index, name,
type, background,
backgroundType, audio, newtext);
backgroundType, newtext, audio);
totalServiceItems++;
return;
}

View file

@ -1,7 +1,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.2
/* import QtMultimedia 5.15 */
import QtMultimedia 5.15
/* import QtAudioEngine 1.15 */
import QtGraphicalEffects 1.15
import org.kde.kirigami 2.13 as Kirigami
@ -69,12 +69,6 @@ Item {
/* onPressed: mpv.playPause(); */
cursorShape: preview ? Qt.ArrowCursor : Qt.BlankCursor
}
MpvObject {
id: audio
onFileLoaded: {}
}
}
Timer {
@ -87,7 +81,7 @@ Item {
print("WHY AREN'T YOU PASUING!");
pauseTimer.restart();
}
audio.loadFile()
audio.source = audioSource.toString();
blackTimer.restart();
}
}
@ -113,6 +107,14 @@ Item {
visible: false
}
MediaPlayer {
id: audio
audioRole: MusicRole
autoLoad: true
autoPlay: true
source: audioSource.toString()
}
Image {
id: backgroundImage
anchors.fill: parent
@ -168,10 +170,14 @@ Item {
mpvLoadingTimer.restart()
}
function playAudio() {
audio.play();
}
function stopVideo() {
mpv.stop();
black.visible = true;
showPassiveNotification("Black is: " + black.visible);
print("Stopped video");
}
function seek(pos) {