如何控制 Flash 中弹出的安全隐私 [英] How to get control on security privacy pop up in flash

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

问题描述

我们正在开发闪光灯相机项目.我们想在页面加载时首先要求用户允许或拒绝相机访问.然后几秒钟后我们要启动相机并拍照.如果用户拒绝相机(或闪光灯)访问,我们不想启动相机.如果用户允许相机(或闪光灯)访问权限,我们要启动相机并拍照.

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);".此代码是用户向用户询问其相机访问权限的用户.

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

所以,它是在 flash 中显示隐私弹出.但是,我们如何控制弹出窗口.我的意思是,当用户关闭弹出窗口时,我们如何知道用户是否选中了允许或拒绝复选框?

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().muted - 如果它是假的,用户已经允许访问相机,如果没有,他不允许访问它.

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.

您还可以监听相机对象上的 status 事件.当它从静音变为取消静音时,您将收到一个事件并可以启动相机.

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.

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

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