getting audio into the slide.. still not playing yet though
This commit is contained in:
parent
3232dd4ab7
commit
7f94cc37e7
5 changed files with 23 additions and 13 deletions
|
@ -221,6 +221,7 @@ Item {
|
||||||
dragItemType = "song";
|
dragItemType = "song";
|
||||||
dragItemBackgroundType = backgroundType;
|
dragItemBackgroundType = backgroundType;
|
||||||
dragItemBackground = background;
|
dragItemBackground = background;
|
||||||
|
dragItemAudio = audio;
|
||||||
draggedLibraryItem = self;
|
draggedLibraryItem = self;
|
||||||
} else {
|
} else {
|
||||||
songListItem.Drag.drop()
|
songListItem.Drag.drop()
|
||||||
|
|
|
@ -25,6 +25,7 @@ Controls.Page {
|
||||||
property string dragItemTitle: ""
|
property string dragItemTitle: ""
|
||||||
property string dragItemType: ""
|
property string dragItemType: ""
|
||||||
property string dragItemText: ""
|
property string dragItemText: ""
|
||||||
|
property string dragItemAudio: ""
|
||||||
property string dragItemBackgroundType: ""
|
property string dragItemBackgroundType: ""
|
||||||
property string dragItemBackground: ""
|
property string dragItemBackground: ""
|
||||||
|
|
||||||
|
@ -139,7 +140,6 @@ Controls.Page {
|
||||||
print("Time to start changing");
|
print("Time to start changing");
|
||||||
|
|
||||||
SlideObject.changeSlide(item);
|
SlideObject.changeSlide(item);
|
||||||
showPassiveNotification(SlideObject.imageBackground);
|
|
||||||
|
|
||||||
/* if (item.backgroundType === "video") */
|
/* if (item.backgroundType === "video") */
|
||||||
/* { */
|
/* { */
|
||||||
|
@ -149,7 +149,6 @@ Controls.Page {
|
||||||
presentation.textIndex = 0;
|
presentation.textIndex = 0;
|
||||||
/* presentation.changeSlide(); */
|
/* presentation.changeSlide(); */
|
||||||
|
|
||||||
showPassiveNotification(SlideObject.imageBackground);
|
|
||||||
print("Slide changed to: " + item.name);
|
print("Slide changed to: " + item.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ Item {
|
||||||
itemType: root.itemType
|
itemType: root.itemType
|
||||||
imageSource: imagebackground
|
imageSource: imagebackground
|
||||||
videoSource: vidbackground
|
videoSource: vidbackground
|
||||||
|
audioSource: SlideObject.audio
|
||||||
text: SlideObject.text
|
text: SlideObject.text
|
||||||
pdfIndex: SlideObject.pdfIndex
|
pdfIndex: SlideObject.pdfIndex
|
||||||
preview: true
|
preview: true
|
||||||
|
@ -212,6 +213,7 @@ Item {
|
||||||
if (changed) {
|
if (changed) {
|
||||||
currentServiceItem--;
|
currentServiceItem--;
|
||||||
loadVideo();
|
loadVideo();
|
||||||
|
/* playAudio(); */
|
||||||
leftDock.changeItem();
|
leftDock.changeItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ ColumnLayout {
|
||||||
dragItemBackground,
|
dragItemBackground,
|
||||||
dragItemBackgroundType,
|
dragItemBackgroundType,
|
||||||
dragItemText,
|
dragItemText,
|
||||||
|
dragItemAudio,
|
||||||
dragItemIndex);
|
dragItemIndex);
|
||||||
dropHighlightLine.visible = false;
|
dropHighlightLine.visible = false;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +122,7 @@ ColumnLayout {
|
||||||
dragItemBackground,
|
dragItemBackground,
|
||||||
dragItemBackgroundType,
|
dragItemBackgroundType,
|
||||||
dragItemText,
|
dragItemText,
|
||||||
|
dragItemAudio,
|
||||||
dragItemIndex);
|
dragItemIndex);
|
||||||
} else if (drag.keys[0] === "serviceitem") {
|
} else if (drag.keys[0] === "serviceitem") {
|
||||||
serviceItemModel.move(serviceItemList.indexDragged,
|
serviceItemModel.move(serviceItemList.indexDragged,
|
||||||
|
@ -229,7 +231,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
showPassiveNotification("Double Clicked")
|
/* showPassiveNotification("Double Clicked") */
|
||||||
serviceItemList.currentIndex = index;
|
serviceItemList.currentIndex = index;
|
||||||
currentServiceItem = index;
|
currentServiceItem = index;
|
||||||
changeServiceItem(index);
|
changeServiceItem(index);
|
||||||
|
@ -408,7 +410,7 @@ ColumnLayout {
|
||||||
print("adding: " + name + " of type " + type);
|
print("adding: " + name + " of type " + type);
|
||||||
serviceItemModel.insertItem(index, name,
|
serviceItemModel.insertItem(index, name,
|
||||||
type, background,
|
type, background,
|
||||||
backgroundType, audio, newtext);
|
backgroundType, newtext, audio);
|
||||||
totalServiceItems++;
|
totalServiceItems++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15 as Controls
|
import QtQuick.Controls 2.15 as Controls
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
/* import QtMultimedia 5.15 */
|
import QtMultimedia 5.15
|
||||||
/* import QtAudioEngine 1.15 */
|
/* import QtAudioEngine 1.15 */
|
||||||
import QtGraphicalEffects 1.15
|
import QtGraphicalEffects 1.15
|
||||||
import org.kde.kirigami 2.13 as Kirigami
|
import org.kde.kirigami 2.13 as Kirigami
|
||||||
|
@ -69,12 +69,6 @@ Item {
|
||||||
/* onPressed: mpv.playPause(); */
|
/* onPressed: mpv.playPause(); */
|
||||||
cursorShape: preview ? Qt.ArrowCursor : Qt.BlankCursor
|
cursorShape: preview ? Qt.ArrowCursor : Qt.BlankCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
MpvObject {
|
|
||||||
id: audio
|
|
||||||
onFileLoaded: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
@ -87,7 +81,7 @@ Item {
|
||||||
print("WHY AREN'T YOU PASUING!");
|
print("WHY AREN'T YOU PASUING!");
|
||||||
pauseTimer.restart();
|
pauseTimer.restart();
|
||||||
}
|
}
|
||||||
audio.loadFile()
|
audio.source = audioSource.toString();
|
||||||
blackTimer.restart();
|
blackTimer.restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,6 +107,14 @@ Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MediaPlayer {
|
||||||
|
id: audio
|
||||||
|
audioRole: MusicRole
|
||||||
|
autoLoad: true
|
||||||
|
autoPlay: true
|
||||||
|
source: audioSource.toString()
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: backgroundImage
|
id: backgroundImage
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -168,10 +170,14 @@ Item {
|
||||||
mpvLoadingTimer.restart()
|
mpvLoadingTimer.restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playAudio() {
|
||||||
|
audio.play();
|
||||||
|
}
|
||||||
|
|
||||||
function stopVideo() {
|
function stopVideo() {
|
||||||
mpv.stop();
|
mpv.stop();
|
||||||
black.visible = true;
|
black.visible = true;
|
||||||
showPassiveNotification("Black is: " + black.visible);
|
print("Stopped video");
|
||||||
}
|
}
|
||||||
|
|
||||||
function seek(pos) {
|
function seek(pos) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue