aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.ts
diff options
context:
space:
mode:
authorbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
committerbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
commitae28cdf327d782e629379eee1999096ca2a5d74b (patch)
treebfe0d4b3a232d75161fe5bba9196553a388fc02a /client/src/standalone/videos/embed.ts
parentd4681c0074ba51c62a3aeb9fb3f2cd071dd21e32 (diff)
parent8cf998733496d44fa564e2e252356b871756c984 (diff)
downloadPeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.gz
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.zst
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.zip
Merge from upstream
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-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),