wulkano / Kap

An open-source screen recorder built with web technology
https://getkap.co
MIT License
18k stars 821 forks source link

#1095 Use different library for screen capture permission #1134

Open thethomasz opened 2 years ago

thethomasz commented 2 years ago

Hopefully fixes #1095 while side stepping the issues in https://github.com/karaggeorge/mac-screen-capture-permissions/releases/tag/v2.0.0. This new package doesn't know if it has already asked for permission though, so on initial load, 2 dialogs will pop up. I'm thinking of adding something similar to what the old library had where it saves whether it has already asked before, but wanted to see if it's even necessary to update the package first.

sindresorhus commented 2 years ago

Make sure you have done this:

If someone wants to work on this, make sure you test the change by running npm run dist and try launching the app in the dist folder.

thethomasz commented 2 years ago

Hmm, not sure why, but just realized that this package doesn't seem to be giving permissions correctly? It'll ask for permissions twice, once when the app is first opened, and another time when the user actually starts a screen recording.

Screen Shot 2022-08-27 at 10 42 04 PM

The first one in the screenshot above is the one required to actually capture the screen, and the one below doesn't do anything at all. Might need some help with this one.

timothyis commented 2 years ago

For the development and production versions, perhaps?

thethomasz commented 2 years ago

For the development and production versions, perhaps?

Hmm, I'm not sure what you mean. Lemme write out the steps I did to reproduce this, maybe my comment wasn't clear.

  1. I removed all apps from having screen capture permissions
  2. Ran npm run dist to build the app, and installed it
  3. Opened Kap which would then prompt me to give it screen capture permissions
  4. After I give it permissions and restart the app, the cropper window appears and I can start recording
  5. When I hit record, another prompt asking for screen capture permissions appears

It shouldn't prompt for a second time, but not sure what I'm doing wrong.