aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/angular.json1
-rw-r--r--client/src/assets/player/utils.ts4
2 files changed, 4 insertions, 1 deletions
diff --git a/client/angular.json b/client/angular.json
index 5ecc335cb..cf92c7ade 100644
--- a/client/angular.json
+++ b/client/angular.json
@@ -150,6 +150,7 @@
150 "linkifyjs/html", 150 "linkifyjs/html",
151 "linkifyjs", 151 "linkifyjs",
152 "markdown-it", 152 "markdown-it",
153 "markdown-it-emoji/light",
153 "sanitize-html", 154 "sanitize-html",
154 "socket.io-client", 155 "socket.io-client",
155 "socket.io-parser", 156 "socket.io-parser",
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'