diff options
Diffstat (limited to 'client/src/standalone')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 1275998b8..b2809467d 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -159,7 +159,7 @@ class PeerTubeEmbed { | |||
159 | muted = false | 159 | muted = false |
160 | loop = false | 160 | loop = false |
161 | enableApi = false | 161 | enableApi = false |
162 | startTime = 0 | 162 | startTime: number | string = 0 |
163 | scope = 'peertube' | 163 | scope = 'peertube' |
164 | 164 | ||
165 | static async main () { | 165 | static async main () { |
@@ -246,9 +246,7 @@ class PeerTubeEmbed { | |||
246 | this.scope = this.getParamString(params, 'scope', this.scope) | 246 | this.scope = this.getParamString(params, 'scope', this.scope) |
247 | 247 | ||
248 | const startTimeParamString = params.get('start') | 248 | const startTimeParamString = params.get('start') |
249 | const startTimeParamNumber = parseInt(startTimeParamString, 10) | 249 | if (startTimeParamString) this.startTime = startTimeParamString |
250 | |||
251 | if (isNaN(startTimeParamNumber) === false) this.startTime = startTimeParamNumber | ||
252 | } catch (err) { | 250 | } catch (err) { |
253 | console.error('Cannot get params from URL.', err) | 251 | console.error('Cannot get params from URL.', err) |
254 | } | 252 | } |