diff --git a/s2-site/docs/api/general/s2-data-config.en.md b/s2-site/docs/api/general/s2-data-config.en.md index 8ac33f743c..c9c648ef08 100644 --- a/s2-site/docs/api/general/s2-data-config.en.md +++ b/s2-site/docs/api/general/s2-data-config.en.md @@ -125,7 +125,8 @@ Function description: Field metadata, configurable field alias and value formatt | prepareText | Perform asynchronous processing on the text before rendering | (value: SimpleData) => Promise | | | | fallback | Fallback display for image loading failure | string | | | | timeout | | number | 10000 | | -| config | | Partial<[ImageStyleProps](https://g.antv.antgroup.com/api/basic/image)> \| Partial<[HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)>\| [HTMLStyleProps](https://g.antv.antgroup.com/api/basic/html) | | | +| config | Configuration for image or video container | Partial<[ImageStyleProps](https://g.antv.antgroup.com/api/basic/image)> \| Partial<[RectStyleProps](https://g.antv.antgroup.com/api/basic/rect)> | | | +| videoConfig | Video configuration, valid only when type is VIDEO | Partial<[HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)> | `{ loop: true, autoplay: false, preload: 'auto', crossOrigin: true, controls: false, muted: true }` | | ### MiniChartData diff --git a/s2-site/docs/api/general/s2-data-config.zh.md b/s2-site/docs/api/general/s2-data-config.zh.md index 130a7a036a..34ce9e7240 100644 --- a/s2-site/docs/api/general/s2-data-config.zh.md +++ b/s2-site/docs/api/general/s2-data-config.zh.md @@ -59,7 +59,8 @@ const s2DataConfig = { | prepareText | 渲染前对文本进行异步处理 | (value: SimpleData) => Promise | | | | fallback | 图片、视频加载失败的兜底展示 | string | | | | timeout | 图片、视频加载超时时间 | number | 10000 | | -| config | 图片、视频的配置项 | Partial<[ImageStyleProps](https://g.antv.antgroup.com/api/basic/image)> \| Partial<[HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)>\| [HTMLStyleProps](https://g.antv.antgroup.com/api/basic/html) | | | +| config | 图片、视频容器的配置项 | Partial<[ImageStyleProps](https://g.antv.antgroup.com/api/basic/image)> \| Partial<[RectStyleProps](https://g.antv.antgroup.com/api/basic/rect)> | | | +| videoConfig | 视频配置项,仅当 type 为 VIDEO 时生效 | Partial<[HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)> | `{ loop: true, autoplay: false, preload: 'auto', crossOrigin: true, controls: false, muted: true }` | | diff --git a/s2-site/docs/manual/advanced/cell-render/video.en.md b/s2-site/docs/manual/advanced/cell-render/video.en.md index f8e82f892c..9070d5f93a 100644 --- a/s2-site/docs/manual/advanced/cell-render/video.en.md +++ b/s2-site/docs/manual/advanced/cell-render/video.en.md @@ -23,7 +23,7 @@ const s2DataConfig = { clickToPreview?: boolean, // Whether to enable click to preview prepareText?: (value: SimpleData) => Promise, // Asynchronously process text before rendering config?: Partial, // Video rectangle area configuration within the cell https://g.antv.antgroup.com/api/css/pattern#htmlvideoelement - videoConfig?: Partial // https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement + videoConfig?: Partial // https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement, default: { loop: true, autoplay: false, preload: 'auto', crossOrigin: true, controls: false, muted: true } } } } diff --git a/s2-site/docs/manual/advanced/cell-render/video.zh.md b/s2-site/docs/manual/advanced/cell-render/video.zh.md index 884ab20aa7..bd0b9bcad6 100644 --- a/s2-site/docs/manual/advanced/cell-render/video.zh.md +++ b/s2-site/docs/manual/advanced/cell-render/video.zh.md @@ -24,7 +24,7 @@ const s2DataConfig = { clickToPreview?: boolean, // 是否开启点击预览 prepareText?: (value: SimpleData) => Promise, // 渲染前对文本进行异步处理 config?: Partial, // 单元格内视频矩形区域配置 https://g.antv.antgroup.com/api/css/pattern#htmlvideoelement - videoConfig?: Partial // https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement + videoConfig?: Partial // https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement,默认值:{ loop: true, autoplay: false, preload: 'auto', crossOrigin: true, controls: false, muted: true } } } }