Skip to content

Commit 19b8a5d

Browse files
author
wangcheng
committed
docs: update docs for language
1 parent ed97803 commit 19b8a5d

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

packages/griffith/README-zh-Hans.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ render(<Player {...props} />)
1717

1818
### `props`
1919

20-
| 字段 | 类型 | 默认值 | 说明 |
21-
| --------------------- | ------------------------------------------------- | --------- | ------------------------------------------ |
22-
| `id` | `string` | | 播放器实例唯一标识 |
23-
| `title` | `string` | | 视频标题 |
24-
| `cover` | `string` | | 视频封面图片 URL |
25-
| `duration` | `number` | | 初始视频时长。在视频元数据载入后使用实际值 |
26-
| `sources` | `sources` | | 视频播放数据。具体见下, |
27-
| `standalone` | `boolean` | `false` | 是否启用 standalone 模式 |
28-
| `onBeforePlay` | `function` | `void` | 视频播放之前回调函数 |
29-
| `shouldObserveResize` | `boolean` | `false` | 是否监听窗口 resize |
30-
| `initialObjectFit` | `fill \| \contain \| cover \| none \| scale-down` | `contain` | object-fit 参数 |
31-
| `useMSE` | `boolean` | `false` | 是否启用 MSE |
32-
| `locale` | `en \| ja \| zh-Hans \| zh-Hant` | `en` | 界面语言 |
20+
| 字段 | 类型 | 默认值 | 说明 |
21+
| --------------------- | ------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------- |
22+
| `id` | `string` | | 播放器实例唯一标识 |
23+
| `title` | `string` | | 视频标题 |
24+
| `cover` | `string` | | 视频封面图片 URL |
25+
| `duration` | `number` | | 初始视频时长。在视频元数据载入后使用实际值 |
26+
| `sources` | `sources` | | 视频播放数据。具体见下, |
27+
| `standalone` | `boolean` | `false` | 是否启用 standalone 模式 |
28+
| `onBeforePlay` | `function` | `void` | 视频播放之前回调函数 |
29+
| `shouldObserveResize` | `boolean` | `false` | 是否监听窗口 resize |
30+
| `initialObjectFit` | `fill \| \contain \| cover \| none \| scale-down` | `contain` | object-fit 参数 |
31+
| `useMSE` | `boolean` | `false` | 是否启用 MSE |
32+
| `language` | `en \| ja \| zh-Hans \| zh-Hant` | `en` | 界面语言。如果未指定,会根据 `html` 标签的 `lang` 属性以及 `navigator.languages` 匹配,如果没有匹配默认为 `en` |
3333

3434
`sources` 字段:
3535

packages/griffith/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ render(<Player {...props} />)
1818

1919
### `Props`
2020

21-
| Name | Type | Default | Description |
22-
| --------------------- | ------------------------------------------------ | --------- | ------------------------------------------------------------------------ |
23-
| `id` | `string` | | Unique identifier of the player instance |
24-
| `title` | `string` | | Video title |
25-
| `cover` | `string` | | Video cover image |
26-
| `duration` | `number` | | Initial video duration. Use actual values after video metadata is loaded |
27-
| `sources` | `sources` | | Video playback data |
28-
| `standalone` | `boolean` | `false` | Enable standalone mode |
29-
| `onBeforePlay` | `function` | `void` | Callback function before video playback |
30-
| `shouldObserveResize` | `boolean` | `false` | Listen to the window resize |
31-
| `initialObjectFit` | `fill \| contain \| cover \| none \| scale-down` | `contain` | object-fit |
32-
| `useMSE` | `boolean` | `false` | Enable Media Source Extensions™ |
33-
| `locale` | `en \| ja \| zh-Hans \| zh-Hant` | `en` | UI Locale |
21+
| Name | Type | Default | Description |
22+
| --------------------- | ------------------------------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
23+
| `id` | `string` | | Unique identifier of the player instance |
24+
| `title` | `string` | | Video title |
25+
| `cover` | `string` | | Video cover image |
26+
| `duration` | `number` | | Initial video duration. Use actual values after video metadata is loaded |
27+
| `sources` | `sources` | | Video playback data |
28+
| `standalone` | `boolean` | `false` | Enable standalone mode |
29+
| `onBeforePlay` | `function` | `void` | Callback function before video playback |
30+
| `shouldObserveResize` | `boolean` | `false` | Listen to the window resize |
31+
| `initialObjectFit` | `fill \| contain \| cover \| none \| scale-down` | `contain` | object-fit |
32+
| `useMSE` | `boolean` | `false` | Enable Media Source Extensions™ |
33+
| `language` | `en \| ja \| zh-Hans \| zh-Hant` | | UI language. If not specified, Griffith will try to detect from `html`'s `lang` attribute and `navigator.languages` and eventually fallback to `en`. |
3434

3535
`sources`:
3636

0 commit comments

Comments
 (0)