mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-05-08 13:21:12 -04:00
all
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user