aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/standalone/videos/embed.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index c113c67da..7daa03f23 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -256,9 +256,8 @@ class PeerTubeEmbed {
256 } 256 }
257 257
258 private async initCore () { 258 private async initCore () {
259 const urlParts = window.location.href.split('/') 259 const urlParts = window.location.pathname.split('/')
260 const lastPart = urlParts[ urlParts.length - 1 ] 260 const videoId = urlParts[ urlParts.length - 1 ]
261 const videoId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[ 0 ]
262 261
263 const [ , serverTranslations, videoResponse, captionsResponse ] = await Promise.all([ 262 const [ , serverTranslations, videoResponse, captionsResponse ] = await Promise.all([
264 loadLocaleInVideoJS(window.location.origin, vjs, navigator.language), 263 loadLocaleInVideoJS(window.location.origin, vjs, navigator.language),