2018-01-31 21:54:25 +01:00
|
|
|
import QtQuick 2.9
|
2018-02-18 17:02:03 +01:00
|
|
|
import net.aimber.screenplaysdk 1.0
|
2018-01-31 21:54:25 +01:00
|
|
|
|
|
|
|
Rectangle {
|
2018-02-12 15:35:08 +01:00
|
|
|
color: "gray"
|
2018-01-31 21:54:25 +01:00
|
|
|
anchors.fill: parent
|
2018-02-18 16:46:47 +01:00
|
|
|
property string tmpVideoPath
|
2018-02-23 11:56:36 +01:00
|
|
|
property var jsonProjectFile
|
|
|
|
Component.onCompleted: {
|
|
|
|
// jsonProjectFile = JSON.parse(mainwindow.projectConfig)
|
|
|
|
|
|
|
|
// if(jsonProjectFile.type === "qmlScene"){
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
2018-02-12 15:35:08 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
ScreenPlaySDK {
|
|
|
|
contentType: "wallpaper"
|
2018-02-12 15:35:08 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
onIncommingMessageError: {
|
2018-02-22 15:22:10 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
}
|
2018-02-12 15:35:08 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
onSdkConnected: {
|
2018-02-22 15:22:10 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
}
|
2018-02-12 15:35:08 +01:00
|
|
|
|
2018-02-18 17:02:03 +01:00
|
|
|
onSdkDisconnected: {
|
|
|
|
//name.text = "disconnected"
|
|
|
|
screenVideo.state = "destroy"
|
|
|
|
mainwindow.destroyThis()
|
|
|
|
}
|
|
|
|
}
|
2018-02-12 15:35:08 +01:00
|
|
|
|
|
|
|
|
2018-02-14 10:21:15 +01:00
|
|
|
Connections {
|
|
|
|
target: mainwindow
|
2018-02-18 16:46:47 +01:00
|
|
|
onPlayVideo: {
|
|
|
|
screenVideo.videoPath = path
|
2018-02-23 11:56:36 +01:00
|
|
|
//screenVideoLoader.setSource("qrc:/ScreenVideo.qml", {videoPath: path})
|
|
|
|
}
|
|
|
|
onPlayQmlScene: {
|
|
|
|
var tmp = Qt.resolvedUrl("file:///" + file)
|
|
|
|
print(tmp)
|
|
|
|
sceneLoader.setSource(tmp)
|
|
|
|
mainwindow.init()
|
2018-02-12 15:35:08 +01:00
|
|
|
}
|
2018-02-23 11:56:36 +01:00
|
|
|
|
2018-02-14 10:21:15 +01:00
|
|
|
}
|
|
|
|
|
2018-02-18 16:46:47 +01:00
|
|
|
ScreenVideo {
|
|
|
|
id:screenVideo
|
2018-02-12 15:35:08 +01:00
|
|
|
}
|
2018-02-23 11:56:36 +01:00
|
|
|
// Loader {
|
|
|
|
// id:screenVideoLoader
|
|
|
|
// anchors.fill: parent
|
|
|
|
// }
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id:sceneLoader
|
|
|
|
anchors.fill: parent
|
|
|
|
z:11
|
|
|
|
}
|
2018-01-31 21:54:25 +01:00
|
|
|
}
|