Skip to content

Commit

Permalink
feat: add fhd text support (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitayoshi authored Sep 11, 2020
1 parent 00eb239 commit 4fb817b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/griffith/README-zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ render(<Player {...props} />)

```ts
interface sources {
[key in ('ld' | 'sd' | 'hd')]: {
[key in ('ld' | 'sd' | 'hd' | 'fhd')]: {
bitrate?: number
duration?: number
format?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/griffith/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ render(<Player {...props} />)

```ts
interface sources {
[key in ('ld' | 'sd' | 'hd')]: {
[key in ('ld' | 'sd' | 'hd' | 'fhd')]: {
bitrate?: number
duration?: number
format?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/griffith/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

type RealQuality = 'ld' | 'sd' | 'hd'
type RealQuality = 'ld' | 'sd' | 'hd' | 'fhd'

interface PlaySource {
bitrate: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const QUALITIES = {
ld: 'quality-ld',
sd: 'quality-sd',
hd: 'quality-hd',
fhd: 'quality-fhd',
}

class QualityMenuItem extends React.PureComponent {
Expand Down
6 changes: 5 additions & 1 deletion packages/griffith/src/components/TranslatedText/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
'quality-ld': 'LD',
'quality-sd': 'SD',
'quality-hd': 'HD',
'quality-fhd': 'FHD',
'action-enter-fullscreen': 'Fullscreen',
'action-exit-fullscreen': 'Exit Fullscreen',
'action-enter-pip': 'Picture in Picture',
Expand All @@ -14,6 +15,7 @@ export default {
'quality-ld': '低画質',
'quality-sd': '標準画質',
'quality-hd': '高画質',
'quality-fhd': '超高画質',
'action-enter-fullscreen': '全画面',
'action-exit-fullscreen': '全画面終了',
'action-enter-pip': 'ピクチャーインピクチャー',
Expand All @@ -24,7 +26,8 @@ export default {
'quality-auto': '自动',
'quality-ld': '低清',
'quality-sd': '标清',
'quality-hd': '超清',
'quality-hd': '高清',
'quality-fhd': '超清',
'action-enter-fullscreen': '全屏',
'action-exit-fullscreen': '退出全屏',
'action-enter-pip': '画中画',
Expand All @@ -36,6 +39,7 @@ export default {
'quality-ld': '低畫質',
'quality-sd': '標準畫質',
'quality-hd': '高畫質',
'quality-fhd': '超高畫質',
'action-enter-fullscreen': '全螢幕',
'action-exit-fullscreen': '結束全螢幕',
'action-enter-pip': '子母畫面',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const QUALITY_ORDER = ['ld', 'sd', 'hd']
const QUALITY_ORDER = ['ld', 'sd', 'hd', 'fhd']

export const getQualities = (sources, isMobile) => {
const qualities = Object.keys(sources).sort(
Expand Down
2 changes: 1 addition & 1 deletion website/md/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ render(<Player {...props} />)

```ts
interface sources {
[key in ('ld' | 'sd' | 'hd')]: {
[key in ('ld' | 'sd' | 'hd' | 'fhd')]: {
bitrate?: number
duration?: number
format?: string
Expand Down

0 comments on commit 4fb817b

Please sign in to comment.