mockingbot/mb_colorpicker_desktop_native

Document option & output for macOS 10.15 Media Capture Permission

Closed this issue · 9 comments

suggested version

For macOS 10.15 Media Capture Permission

extra command option is provided for checking & requesting the Permission: (darwin version only)

  • --mode=0:
    will print Permission Granted: YES or Permission Granted: NO to stdout,
    and exit, no color-picking
  • --mode=1:
    will try to trigger system Permission Popup to user,
    ?? wait for the result, ??
    ?? then print Permission Granted: YES or Permission Granted: NO to stdout, ??
    and exit, no color-picking

need more info

  • the **?? uncertain ??** marked part is not verified behavior
  • and will the --mode=1 be able to re-trigger system popup after user choose Deny the first time?
    • if not, --mode=0 output may need to be change to YES/NO/UNDETERMINED, for outer program to ask user to do the required tinkering

here's some related reference I found for Media Capture Permission, might be good to include as reference in the comment near the related code:

等我一下哈,我一会儿添加一个中文的说明。
你提到的那个如果用户拒绝后没法再次弹出权限选择窗口的问题我已经发现了。这个问题要解决的话可能比看上要复杂一些,我现在正在处理。稍等一下哈,谢谢~~。

我这边查到的官方 doc 提到了 AVCaptureScreenInput A capture input for recording from a screen in macOS. 可能是桌面输入
对应的 AVCaptureDevice authorizationStatusForMediaType: 可能是授权接口,相关说明是上面提到的第一条链接

嗯嗯,看到了,我研究一下,谢谢啦~~

文档和测试都已更新~~
现在保证了即使用户第一次拒绝后权限选择窗口也还是能弹出了。

我在release的tag版本号上面还是用了旧的v2.0.0,里面的可执行文件我已经更新了,麻烦了~~

OK,我后面跟进下更新

有一点疑问,在 --mode=2
Promote Screen Record Permission Grant Window Succeeded: YES/NO 仅代表 清除了指定程序的权限记录 的结果
后续程序是否会继续输出 Screen Record Permission Granted: YES/NO 的结果?
还是需要再次运行 --mode=1 获得?

后续不会输出Screen Record Permission Granted 的结果了,因为这个功能仅能触发窗口弹出,而且弹出后用户最终选择了什么程序是没法知道的,所以还需要再次运行mode=1

有其他疑问可以随时联系~~~