aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-15 16:57:59 +0100
committerChocobozzz <me@florianbigard.com>2018-11-15 16:57:59 +0100
commit6385c0cb7f773f5212a96807468988e17dba1d6d (patch)
treeaa4bd970d2bf39ca643792c2f430019813ed6538 /client
parent030177d246834fdba89be9bbaeac497589b47102 (diff)
downloadPeerTube-6385c0cb7f773f5212a96807468988e17dba1d6d.tar.gz
PeerTube-6385c0cb7f773f5212a96807468988e17dba1d6d.tar.zst
PeerTube-6385c0cb7f773f5212a96807468988e17dba1d6d.zip
Fix embed video id parsing
Diffstat (limited to 'client')
-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),