Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.2
- import Sailfish.Silica 1.0
- // .pro: QT += multimedia
- // .yaml: Requires: - qt5-qtmultimedia
- import QtMultimedia 5.5
- Page {
- id: page
- allowedOrientations: Orientation.Portrait
- Camera {
- id: camera
- captureMode: Camera.CaptureVideo
- }
- VideoOutput {
- anchors.fill: parent
- source: camera
- MouseArea {
- anchors.fill: parent
- onClicked: {
- switch (camera.videoRecorder.recorderState) {
- case CameraRecorder.StoppedState:
- camera.videoRecorder.record();
- break;
- case CameraRecorder.RecordingState:
- camera.videoRecorder.stop();
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement