1
0
Fork 0

Fix embed view with search params

This commit is contained in:
Chocobozzz 2018-06-07 15:03:33 +02:00
parent 3baf9be283
commit 46659d01df
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -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))