projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3baf9be
)
Fix embed view with search params
author
Chocobozzz
<me@florianbigard.com>
Thu, 7 Jun 2018 13:03:33 +0000
(15:03 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Thu, 7 Jun 2018 13:03:33 +0000
(15:03 +0200)
client/src/standalone/videos/embed.ts
patch
|
blob
|
history
diff --git
a/client/src/standalone/videos/embed.ts
b/client/src/standalone/videos/embed.ts
index 1660132264f86c91a3db2b90d35eeb26f0594f7b..4f6fae8aa2c839f72bc7a89be1293a38e920819e 100644
(file)
--- a/
client/src/standalone/videos/embed.ts
+++ b/
client/src/standalone/videos/embed.ts
@@
-59,7
+59,8
@@
function videoFetchError (videoElement: HTMLVideoElement) {
}
const urlParts = window.location.href.split('/')
-const videoId = urlParts[urlParts.length - 1]
+const lastPart = urlParts[urlParts.length - 1]
+const videoId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[0]
loadLocale(environment.apiUrl, videojs, navigator.language)
.then(() => loadVideoInfo(videoId))