Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135256

Camera not functioning if permission granted later

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.4, 6.10.0 FF
    • 6.9
    • Multimedia
    • None
    • iOS/tvOS/watchOS, macOS
    • 6a52a7c1f (dev), 42fea9236 (dev), 2563e60dd (tqtc/lts-6.8), 984e457c4 (tqtc/lts-6.8)
    • Multimedia, weeks 13-14, Multimedia, weeks 15-16

    Description

      Observed on macOS and iOS.

      If you have a QML setup similar to the following:

      CameraPermission {
          id: cameraPermission
          onStatusChanged: () => {
              if (status === Qt.PermissionStatus.Granted) {
                  myCamera.active = true
              }
          }
      }
      Component.onCompleted: cameraPermission.request()
      
      TestLib.CameraHelper {
          id: myCamera
          active: true
      }

      Then the camera will have the property "active" set to true, even before the permission is granted, and it will not transmit any frames. If the user then grants access, the camera will still not send transmit any frames even though it is still marked as active and permission is granted.

      This leaves the camera in an unusable state until the user switches device and then back. This workaround is impossible if the user only has a single camera connected.

      What do you expect to happen
      I expect the camera to not go into "active = true" whenever permission is not granted. Instead I expect it to start working once I assign true to the "active" property, only after permission has been granted.

      Attachments

        For Gerrit Dashboard: QTBUG-135256
        # Subject Branch Project Status CR V

        Activity

          People

            npskalerud Nils Petter Skålerud
            npskalerud Nils Petter Skålerud
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: