Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/en/api/elements/built-in/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ lynx
params: {
format: 'jpeg', // Specify the image format, supports jpeg and png, the default is jpeg.
scale: 0.5, // Specify the image quality, 0 < scale <= 1, the default is 1, the smaller the value, the blurrier and smaller the size.
androidEnablePixelCopy: false, // Specify whether to use PixelCopy to take screenshots on Android, the default is false.
},
success: function (res) {
console.log(res);
Expand All @@ -666,7 +667,7 @@ The front end can call this method to obtain the base64 image of the target node
:::tip
This operation will take up time in the main thread, so you need to pay attention to the calling frequency.

When used on Android, you need to set [`flatten`](#flatten) to `false` on the corresponding node.
On Android, you must set [`flatten`](#flatten) to `false` on the target node. For SDK versions 3.5 and newer, you can enable screenshots via [PixelCopy](https://developer.android.com/reference/android/view/PixelCopy) by setting the `androidEnablePixelCopy` parameter, which solves the issue of inability to take screenshots in Video/Surface nodes.
:::

### `requestAccessibilityFocus`
Expand Down
3 changes: 2 additions & 1 deletion docs/zh/api/elements/built-in/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ lynx
params: {
format: 'jpeg', // 指定图片格式,支持 jpeg、png,默认为 jpeg
scale: 0.5, // 指定图片质量,0 < scale <= 1,默认为 1,越小越模糊,体积也越小
androidEnablePixelCopy: false, // 指定 Android 上是否用 PixelCopy 方式截图,默认为 false
},
success: function (res) {
console.log(res);
Expand All @@ -670,7 +671,7 @@ lynx
:::tip
该操作会占用主线程耗时,需要注意调用频率。

Android 上使用时需要在对应节点设置 [`flatten`](#flatten) 为 `false`。
Android 上使用时需要在对应节点设置 [`flatten`](#flatten) 为 `false`。在 SDK 版本大于等于 3.5 支持 `androidEnablePixelCopy` 用 [PixelCopy](https://developer.android.com/reference/android/view/PixelCopy)方式截图,解决 Video/Surface 场景无法截图的问题。
:::

### `requestAccessibilityFocus`
Expand Down