diff --git a/packages/griffith/README-zh_CN.md b/packages/griffith/README-zh_CN.md index 0205f88d..4d5f7970 100644 --- a/packages/griffith/README-zh_CN.md +++ b/packages/griffith/README-zh_CN.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 \| 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` 字段: diff --git a/packages/griffith/README.md b/packages/griffith/README.md index 258b5209..30498acf 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 \| 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`: diff --git a/packages/griffith/index.d.ts b/packages/griffith/index.d.ts index e4803113..7ea48d72 100644 --- a/packages/griffith/index.d.ts +++ b/packages/griffith/index.d.ts @@ -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 {