aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/utils.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts
index 280f721bd..6767459ce 100644
--- a/client/src/assets/player/utils.ts
+++ b/client/src/assets/player/utils.ts
@@ -68,7 +68,7 @@ function buildVideoLink (options: {
68 68
69 const params = generateParams(window.location.search) 69 const params = generateParams(window.location.search)
70 70
71 if (options.startTime) { 71 if (options.startTime !== undefined && options.startTime !== null) {
72 const startTimeInt = Math.floor(options.startTime) 72 const startTimeInt = Math.floor(options.startTime)
73 params.set('start', secondsToTime(startTimeInt)) 73 params.set('start', secondsToTime(startTimeInt))
74 } 74 }
@@ -146,6 +146,8 @@ function timeToInt (time: number | string) {
146function secondsToTime (seconds: number, full = false, symbol?: string) { 146function secondsToTime (seconds: number, full = false, symbol?: string) {
147 let time = '' 147 let time = ''
148 148
149 if (seconds === 0 && !full) return '0s'
150
149 const hourSymbol = (symbol || 'h') 151 const hourSymbol = (symbol || 'h')
150 const minuteSymbol = (symbol || 'm') 152 const minuteSymbol = (symbol || 'm')
151 const secondsSymbol = full ? '' : 's' 153 const secondsSymbol = full ? '' : 's'