From 19b8a5dc8266bebfd535a2ae842d57e961b07eb7 Mon Sep 17 00:00:00 2001 From: wangcheng Date: Wed, 27 Mar 2019 13:09:32 +0800 Subject: [PATCH] docs: update docs for language --- packages/griffith/README-zh-Hans.md | 26 +++++++++++++------------- packages/griffith/README.md | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/griffith/README-zh-Hans.md b/packages/griffith/README-zh-Hans.md index 6251bc14..7ff895d2 100644 --- a/packages/griffith/README-zh-Hans.md +++ b/packages/griffith/README-zh-Hans.md @@ -17,19 +17,19 @@ render() ### `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 \| ja \| zh-Hans \| zh-Hant` | `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 | +| `language` | `en \| ja \| zh-Hans \| zh-Hant` | `en` | 界面语言。如果未指定,会根据 `html` 标签的 `lang` 属性以及 `navigator.languages` 匹配,如果没有匹配默认为 `en` | `sources` 字段: diff --git a/packages/griffith/README.md b/packages/griffith/README.md index 9a5cb2fb..3bfd7750 100644 --- a/packages/griffith/README.md +++ b/packages/griffith/README.md @@ -18,19 +18,19 @@ render() ### `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 \| ja \| zh-Hans \| zh-Hant` | `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™ | +| `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`. | `sources`: