aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-17 14:14:54 +0100
committerChocobozzz <me@florianbigard.com>2018-12-17 14:15:30 +0100
commit3b019808ef529cacce7f40706441670309e231d1 (patch)
tree3fd6668e16943da46ca4be12d2c92aa360183edf /client/src/assets/player/utils.ts
parent259dd796e6d93db8068ec47aac99a560f2818673 (diff)
downloadPeerTube-3b019808ef529cacce7f40706441670309e231d1.tar.gz
PeerTube-3b019808ef529cacce7f40706441670309e231d1.tar.zst
PeerTube-3b019808ef529cacce7f40706441670309e231d1.zip
Set last subtitle or subtitle in URL
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r--client/src/assets/player/utils.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts
index c87287482..8b9f34b99 100644
--- a/client/src/assets/player/utils.ts
+++ b/client/src/assets/player/utils.ts
@@ -39,6 +39,7 @@ function buildVideoLink (time?: number, url?: string) {
39} 39}
40 40
41function timeToInt (time: number | string) { 41function timeToInt (time: number | string) {
42 if (!time) return 0
42 if (typeof time === 'number') return time 43 if (typeof time === 'number') return time
43 44
44 const reg = /^((\d+)h)?((\d+)m)?((\d+)s?)?$/ 45 const reg = /^((\d+)h)?((\d+)m)?((\d+)s?)?$/