public interface

MediaAccessPermissionsCallback

com.tencent.smtt.export.external.interfaces.MediaAccessPermissionsCallback

Class Overview

当网页请求摄像头,MCI权限时将会回调 onPermissionRequest(String, long, MediaAccessPermissionsCallback) 其中callback为该类的实例,可以利用该回调接口设置允许获取的权限类型,以及对应的授权是否缓存

Summary

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.

Constants

public static final long ALLOW_AUDIO_CAPTURE

允许获取MIC权限

Constant Value: 4 (0x0000000000000004)

public static final long ALLOW_VIDEO_CAPTURE

允许获取摄像头权限

Constant Value: 2 (0x0000000000000002)

public static final long BITMASK_RESOURCE_AUDIO_CAPTURE

请求MIC权限

Constant Value: 4 (0x0000000000000004)

public static final long BITMASK_RESOURCE_VIDEO_CAPTURE

请求摄像头权限

Constant Value: 2 (0x0000000000000002)

Public Methods

public abstract void invoke (String origin, long allow, boolean remember)

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

Parameters
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