Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix embed view with search params

Chocobozzz46659d01dfd5
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 1660132264..4f6fae8aa2 100644
--- 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))