karaggeorge / kap-camera

15 stars 7 forks source link

Cancelling Kap camera permissions - UX workflow bug and Error on recording stop #38

Closed SgtPooki closed 3 years ago

SgtPooki commented 3 years ago

macOS version: ProductName: Mac OS X ProductVersion: 10.15.7 BuildVersion: 19H524

Kap version: 3.3.2

Quick explanation:

I copied this template from Kap's issue template. I'm not sure how much of this is for Kap core(https://github.com/wulkano/Kap/issues/992), and how much is for this plugin. Let me know if you can change any of this or not.

Steps to reproduce

  1. Make sure Kap does not have access to your camera in system preferences
  2. Open Kap and click record
  3. It will prompt you to give kap permission to use your camera (every time you click record when kap doesn't have permission)
  4. Click cancel instead of granting access. Recording will start
  5. Record your video and then click stop.

Current behavior

The video will have recorded successfully, and you can export/save or do whatever you normally do, but a message will pop up with this error after you click stop:

Unhandled Promise Rejection
CancelError: Promise was canceled
    at PCancelable.cancel (/p-cancelable/index.js:99:17)
    at Object.didStopRecording (/kap-key-cast/index.js:54:17)
    at /Applications/Kap.app/Contents/Resources/app.asar/main/common/aperture.js:56:28
    at Array.map (<anonymous>)
    at callPlugins (/Applications/Kap.app/Contents/Resources/app.asar/main/common/aperture.js:53:66)
    at cleanup (/Applications/Kap.app/Contents/Resources/app.asar/main/common/aperture.js:74:9)
    at Tray.stopRecording (/Applications/Kap.app/Contents/Resources/app.asar/main/common/aperture.js:218:5)

Expected behavior

  1. No prompt (for anything) between me clicking record and the recording starting.
    • Prompt users when opening Kap for permissions, and then never again
    • or at least before the "recording initialization" loo. NOT as a pitstop between 1. clicking record and 2. recording start.
  2. Do not prompt me for the same permissions each time I try to record. If i've declined them once, I probably don't want to enable it.

The permissions pop-up is unexpected and unnecessary once, but especially more than once. Once a user hits record, recording should start. If you need to check permissions on record button hit, then do so, but prompt the user to hit record again.

Workaround

No workaround needed, error seemed to have no impact except to provide me with an error message that Kap didn't handle a promise rejection.

karaggeorge commented 3 years ago

https://github.com/karaggeorge/kap-key-cast/issues/7