com.tencent.smtt.export.external.interfaces.MediaAccessPermissionsCallback |
当网页请求摄像头,MCI权限时将会回调
onPermissionRequest(String, long, MediaAccessPermissionsCallback)
其中callback为该类的实例,可以利用该回调接口设置允许获取的权限类型,以及对应的授权是否缓存
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | ALLOW_AUDIO_CAPTURE | 允许获取MIC权限 | |||||||||
long | ALLOW_VIDEO_CAPTURE | 允许获取摄像头权限 | |||||||||
long | BITMASK_RESOURCE_AUDIO_CAPTURE | 请求MIC权限 | |||||||||
long | BITMASK_RESOURCE_VIDEO_CAPTURE | 请求摄像头权限 |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
invoke(String origin, long allow, boolean remember)
Sets the media permission state for the supplied origin.
|
允许获取MIC权限
允许获取摄像头权限
请求MIC权限
请求摄像头权限
Sets the media permission state for the supplied origin. (allow & ALLOW_VIDEO_CAPTURE) != 0, allow use camera (allow & ALLOW_AUDIO_CAPTURE) != 0, allow use mic
origin | the origin for which permissions are set |
---|---|
allow | whether or not the origin should be allowed to use the media API |
remember | whether the permission should be retained beyond the lifetime of a page currently being displayed by a WebView |