diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-07 15:03:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-07 15:03:33 +0200 |
commit | 46659d01dfd51a5ff3ca389978f8a0dda1d986d9 (patch) | |
tree | 6e720e842711a777c0aea89323d33d121c0e76ee /client/src/standalone/videos | |
parent | 3baf9be283d75cddc8aab918e6d6557371fbd9e9 (diff) | |
download | PeerTube-46659d01dfd51a5ff3ca389978f8a0dda1d986d9.tar.gz PeerTube-46659d01dfd51a5ff3ca389978f8a0dda1d986d9.tar.zst PeerTube-46659d01dfd51a5ff3ca389978f8a0dda1d986d9.zip |
Fix embed view with search params
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 166013226..4f6fae8aa 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -59,7 +59,8 @@ function videoFetchError (videoElement: HTMLVideoElement) { | |||
59 | } | 59 | } |
60 | 60 | ||
61 | const urlParts = window.location.href.split('/') | 61 | const urlParts = window.location.href.split('/') |
62 | const videoId = urlParts[urlParts.length - 1] | 62 | const lastPart = urlParts[urlParts.length - 1] |
63 | const videoId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[0] | ||
63 | 64 | ||
64 | loadLocale(environment.apiUrl, videojs, navigator.language) | 65 | loadLocale(environment.apiUrl, videojs, navigator.language) |
65 | .then(() => loadVideoInfo(videoId)) | 66 | .then(() => loadVideoInfo(videoId)) |