Skip to content

Commit

Permalink
docs: update locale docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcheng committed Mar 26, 2019
1 parent fd004f6 commit 632c784
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
26 changes: 13 additions & 13 deletions packages/griffith/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ render(<Player {...props} />)

### `props`

| 字段 | 类型 | 默认值 | 说明 |
| --------------------- | ------------------------------------------------- | --------- | ------------------------------------------ |
| `id` | `string` | | 播放器实例唯一标识 |
| `title` | `string` | | 视频标题 |
| `cover` | `string` | | 视频封面图片 URL |
| `duration` | `number` | | 初始视频时长。在视频元数据载入后使用实际值 |
| `sources` | `sources` | | 视频播放数据。具体见下, |
| `standalone` | `boolean` | `false` | 是否启用 standalone 模式 |
| `onBeforePlay` | `function` | `void` | 视频播放之前回调函数 |
| `shouldObserveResize` | `boolean` | `false` | 是否监听窗口 resize |
| `initialObjectFit` | `fill \| \contain \| cover \| none \| scale-down` | `contain` | object-fit 参数 |
| `useMSE` | `boolean` | `false` | 是否启用 MSE |
| `locale` | `en \| zh_cn` | `en` | 界面语言 |
| 字段 | 类型 | 默认值 | 说明 |
| --------------------- | ------------------------------------------------- | --------- | ------------------------------------------------------ |
| `id` | `string` | | 播放器实例唯一标识 |
| `title` | `string` | | 视频标题 |
| `cover` | `string` | | 视频封面图片 URL |
| `duration` | `number` | | 初始视频时长。在视频元数据载入后使用实际值 |
| `sources` | `sources` | | 视频播放数据。具体见下, |
| `standalone` | `boolean` | `false` | 是否启用 standalone 模式 |
| `onBeforePlay` | `function` | `void` | 视频播放之前回调函数 |
| `shouldObserveResize` | `boolean` | `false` | 是否监听窗口 resize |
| `initialObjectFit` | `fill \| \contain \| cover \| none \| scale-down` | `contain` | object-fit 参数 |
| `useMSE` | `boolean` | `false` | 是否启用 MSE |
| `locale` | `en \| zh_cn \| zh_tw` | `en` | 界面语言。如果没有传,将根据 html 的 `lang` 属性匹配。 |

`sources` 字段:

Expand Down
26 changes: 13 additions & 13 deletions packages/griffith/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ render(<Player {...props} />)

### `Props`

| Name | Type | Default | Description |
| --------------------- | ------------------------------------------------ | --------- | ------------------------------------------------------------------------ |
| `id` | `string` | | Unique identifier of the player instance |
| `title` | `string` | | Video title |
| `cover` | `string` | | Video cover image |
| `duration` | `number` | | Initial video duration. Use actual values after video metadata is loaded |
| `sources` | `sources` | | Video playback data |
| `standalone` | `boolean` | `false` | Enable standalone mode |
| `onBeforePlay` | `function` | `void` | Callback function before video playback |
| `shouldObserveResize` | `boolean` | `false` | Listen to the window resize |
| `initialObjectFit` | `fill \| contain \| cover \| none \| scale-down` | `contain` | object-fit |
| `useMSE` | `boolean` | `false` | Enable Media Source Extensions™ |
| `locale` | `en \| zh_cn` | `en` | UI Locale |
| Name | Type | Default | Description |
| --------------------- | ------------------------------------------------ | --------- | ---------------------------------------------------------------------------------------- |
| `id` | `string` | | Unique identifier of the player instance |
| `title` | `string` | | Video title |
| `cover` | `string` | | Video cover image |
| `duration` | `number` | | Initial video duration. Use actual values after video metadata is loaded |
| `sources` | `sources` | | Video playback data |
| `standalone` | `boolean` | `false` | Enable standalone mode |
| `onBeforePlay` | `function` | `void` | Callback function before video playback |
| `shouldObserveResize` | `boolean` | `false` | Listen to the window resize |
| `initialObjectFit` | `fill \| contain \| cover \| none \| scale-down` | `contain` | object-fit |
| `useMSE` | `boolean` | `false` | Enable Media Source Extensions™ |
| `locale` | `en \| zh_cn \| zh_tw` | `en` | UI Locale. If not provided, Griffith will try to guess from `lang` attribute of the html |

`sources`:

Expand Down
2 changes: 1 addition & 1 deletion packages/griffith/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface PlayerContainerProps {
shouldObserveResize?: boolean
initialObjectFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
useMSE?: boolean
locale?: 'en' | 'zh_cn'
locale?: 'en' | 'zh_cn' | 'zh-tw'
}

interface Subscription {
Expand Down

0 comments on commit 632c784

Please sign in to comment.