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) { } 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))