如何获得安全隐私控制闪光灯弹出 [英] How to get control on security privacy pop up in flash

查看:246
本文介绍了如何获得安全隐私控制闪光灯弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在努力闪光灯摄像头项目。我们要问用户允许或拒绝先在页面加载摄像头的访问。然后几秒钟后,我们要开始相机和拍照。如果用户拒绝相机(或闪光灯)的访问,我们不希望启动相机。而如果用户允许相机(或闪光灯)访问权限,我们要启动相机和拍照。

We are working on flash camera project. We want to ask user to allow or deny camera access first on page load. then after few seconds we want to start camera and take photo. If User deny camera (or flash) access, we do not want to start camera. and If user allows permission for camera (or flash) access, we want to start camera and take photo.

对于这一点,我们使用的是Security.showSettings(SecurityPanel.PRIVACY);。这code是用户的请求允许用户对自己的相机接入。

For this, We are using "Security.showSettings(SecurityPanel.PRIVACY);". This code is user for ask permission to user about their camera access.

因此​​,它是显示隐私弹出闪光灯。但是,我们怎么能有上弹出控制。我的意思是,我们如何知道这是用户选中的允许或拒绝复选框,当用户关闭弹出?

So, it is show Privacy Pop up in flash. But, how we can have control on that pop up. I mean, how we can know that is user checked on allow or deny check Box when user close pop up?

感谢你。

推荐答案

看一看 Camera.getCamera()静音 - 如果它是假的用户允许访问相机,如果没有,他没有允许访问。

Have a look at Camera.getCamera().muted - if it's false the user has allowed access to the camera, if not, he's not allowing access to it.

您还可以收听状态事件相机对象。当它从静音变为取消静音,你会得到一个事件,可以启动摄像头。

You can also listen to the status event on the camera object. When it changes from muted to unmuted, you'll get an event and can start the camera.

这篇关于如何获得安全隐私控制闪光灯弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆