|
|
@ -40,10 +40,14 @@ export function Time(props: { short?: boolean }) { |
|
|
|
const timeFinished = new Date(Date.now() + secondsRemaining * 1e3); |
|
|
|
const timeFinished = new Date(Date.now() + secondsRemaining * 1e3); |
|
|
|
const duration = formatSeconds(timeDuration, hasHours); |
|
|
|
const duration = formatSeconds(timeDuration, hasHours); |
|
|
|
|
|
|
|
|
|
|
|
let localizationKey = "regular"; |
|
|
|
let localizationKey = |
|
|
|
if (props.short) localizationKey = "short"; |
|
|
|
timeFormat === VideoPlayerTimeFormat.REGULAR ? "regular" : "remaining"; |
|
|
|
else if (timeFormat === VideoPlayerTimeFormat.REMAINING) |
|
|
|
if (props.short) { |
|
|
|
localizationKey = "remaining"; |
|
|
|
localizationKey = |
|
|
|
|
|
|
|
timeFormat === VideoPlayerTimeFormat.REGULAR |
|
|
|
|
|
|
|
? "shortRegular" |
|
|
|
|
|
|
|
: "shortRemaining"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<VideoPlayerButton onClick={() => toggleMode()}> |
|
|
|
<VideoPlayerButton onClick={() => toggleMode()}> |
|
|
|