Merged PR 2266: update media tabs display and query
update media tabs display and query Related work items: #22698
This commit is contained in:
@@ -459,7 +459,7 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
||||
.map((item) => {
|
||||
const link = isWelsh
|
||||
? item.pinswg_mediaLinkCY
|
||||
: item.pinswg_mediaLinkEN;
|
||||
: item.pinswg_videoplatformurl;
|
||||
|
||||
const videoId = extractYouTubeId(link);
|
||||
if (!videoId) return null;
|
||||
@@ -468,15 +468,15 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
||||
key:
|
||||
item.pinswg_documentid ||
|
||||
item.pinswg_mediaid ||
|
||||
`${item.pinswg_name}-${videoId}`,
|
||||
`${item.pinswg_eventrecordingid}-${videoId}`,
|
||||
videoId,
|
||||
name: item.pinswg_name || "Video",
|
||||
name: item.pinswg_eventrecordingname || "Video",
|
||||
description: item.pinswg_description || "",
|
||||
// If you later store duration in CRM, map it here (e.g. "03:42")
|
||||
duration: item.pinswg_duration || null,
|
||||
thumbnailHQ: `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`,
|
||||
thumbnailMax: `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
|
||||
raw: item,
|
||||
raw: item
|
||||
};
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user