openharmony 鸿蒙 arkts-basic-components-web-ScreenCaptureHandler

2026-08-25 浏览 (1)

Class (ScreenCaptureHandler)

Implements the ScreenCaptureHandler object for accepting or rejecting a screen capture request. For details about the sample code, see onScreenCaptureRequest.

NOTE

  • The initial APIs of this component are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.

  • The initial APIs of this class are supported since API version 10.

  • The sample effect is subject to the actual device.

constructor10+

constructor()

Constructs a ScreenCaptureHandler object.

System capability: SystemCapability.Web.Webview.Core

deny10+

deny(): void

Rejects this screen capture request.

System capability: SystemCapability.Web.Webview.Core

getOrigin10+

getOrigin(): string

Obtains the origin of this web page.

System capability: SystemCapability.Web.Webview.Core

Return value

TypeDescription
stringOrigin of the web page that requests the permission.

grant10+

grant(config: ScreenCaptureConfig): void

Grants the screen capture permission.

NOTE

The ohos.permission.MICROPHONE permission must be declared.

System capability: SystemCapability.Web.Webview.Core

Parameters

NameTypeMandatoryDescription
configScreenCaptureConfigYesScreen capture configuration.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-webview-WebviewController

openharmony 鸿蒙 arkts-apis-webview-t

openharmony 鸿蒙 arkts-apis-webview

openharmony 鸿蒙 capi-arkweb-type-h

openharmony 鸿蒙 arkts-basic-components-web-FullScreenExitHandler

openharmony 鸿蒙 arkts-apis-webview-WebDownloadManager

openharmony 鸿蒙 arkts-basic-components-web-VerifyPinHandler

openharmony 鸿蒙 capi-web-arkweb-webmessage8h

openharmony 鸿蒙 arkts-apis-webview-NativeMediaPlayerHandler

openharmony 鸿蒙 capi-web-arkweb-proxymethodwithresult

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/ehDNrVFd