]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/utils.ts
Use source sans 3 font
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / utils.ts
index 280f721bdbcdf3d4ec5437e70215e59607d79b4d..6767459ce9fbc800788cb39bd96a2855b3f92d97 100644 (file)
@@ -68,7 +68,7 @@ function buildVideoLink (options: {
 
   const params = generateParams(window.location.search)
 
-  if (options.startTime) {
+  if (options.startTime !== undefined && options.startTime !== null) {
     const startTimeInt = Math.floor(options.startTime)
     params.set('start', secondsToTime(startTimeInt))
   }
@@ -146,6 +146,8 @@ function timeToInt (time: number | string) {
 function secondsToTime (seconds: number, full = false, symbol?: string) {
   let time = ''
 
+  if (seconds === 0 && !full) return '0s'
+
   const hourSymbol = (symbol || 'h')
   const minuteSymbol = (symbol || 'm')
   const secondsSymbol = full ? '' : 's'