mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-25 18:20:31 -06:00
Fix 00:00 player timestamp
This commit is contained in:
parent
69524f6ed1
commit
fc41887463
@ -150,6 +150,7 @@
|
||||
"linkifyjs/html",
|
||||
"linkifyjs",
|
||||
"markdown-it",
|
||||
"markdown-it-emoji/light",
|
||||
"sanitize-html",
|
||||
"socket.io-client",
|
||||
"socket.io-parser",
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user