Created
April 25, 2019 12:21
-
-
Save rominf/942f08158affdfde3dd490d196ec7eec to your computer and use it in GitHub Desktop.
CameraSelectionPage.qml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScrollView { | |
anchors.fill: context; | |
ListView { | |
anchors.fill: parent; | |
spacing: 10; | |
model: ListModel { | |
id: camerasModel; | |
} | |
delegate: Rectangle { | |
color: "#6fda9c"; | |
width: 500; | |
height: 50; | |
Text { | |
anchors.centerIn: parent; | |
text: model.text; | |
color: "white"; | |
} | |
ClickMixin { } | |
onClicked: { | |
mediaserverClient.instance.authDigest() | |
.then((auth) => { | |
var cameraId = model.id.replace(/[{}]/, ''); | |
cameraVideoPlayer.source = mediaserverClient.instance.url.path('/media/' + cameraId + '.webm').query({'auth': auth}); | |
pages.currentIndex = 2; | |
}) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment