This commit is contained in:
Markos Gogoulos
2026-05-04 19:06:38 +03:00
parent 4238559b95
commit a89bbd141d
33 changed files with 514 additions and 353 deletions
@@ -2216,12 +2216,26 @@ function VideoJSPlayer({ videoId = 'default-video', showTitle = true, showRelate
// BEGIN: Add Embed Info Overlay Component (for embed player only)
if (isEmbedPlayer) {
let overlayVideoUrl = currentVideo.url;
let overlayTitleTarget = '_blank';
const parentMediaBase = mediaData?.parentMediaBase;
if (parentMediaBase) {
const token = new URLSearchParams(window.location.search).get('m');
if (token) {
const sep = parentMediaBase.includes('?') ? '&' : '?';
overlayVideoUrl = `${parentMediaBase}${sep}token=${token}`;
overlayTitleTarget = '_blank';
}
}
customComponents.current.embedInfoOverlay = new EmbedInfoOverlay(playerRef.current, {
authorName: currentVideo.author_name,
authorProfile: currentVideo.author_profile,
authorThumbnail: currentVideo.author_thumbnail,
videoTitle: currentVideo.title,
videoUrl: currentVideo.url,
videoUrl: overlayVideoUrl,
titleTarget: overlayTitleTarget,
showTitle: finalShowTitle,
showRelated: finalShowRelated,
showUserAvatar: finalShowUserAvatar,