diff --git a/public/assets/my.js b/public/assets/my.js index ec5c9ae..1031d28 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -294,7 +294,9 @@ if (!items.length) { el.innerHTML = '
Training materials are being added. Check back soon.
'; return; } el.innerHTML = items.map(it => { const isVid = it.videoUrl && /\.(mp4|webm)(\?|$)/i.test(it.videoUrl); - const media = isVid ? '' : ''; + // poster: the admin list can carry one; otherwise assume a .jpg next to the .mp4 (the pipeline uploads both) + const poster = it.posterUrl || (isVid ? it.videoUrl.replace(/\.(mp4|webm)(\?.*)?$/i, '.jpg$2') : ''); + const media = isVid ? '' : ''; const links = []; if (it.videoUrl && !isVid) links.push('Watch'); if (it.docUrl) links.push('Open material');