Skip to content

Commit

Permalink
[MWPW-159903] Fix quiz video marquees (adobecom#3009)
Browse files Browse the repository at this point in the history
fix quiz marquees
  • Loading branch information
mokimo authored Oct 4, 2024
1 parent baea3ad commit 1bdfd4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/utils/decorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export async function loadCDT(el, classList) {

export function decorateAnchorVideo({ src = '', anchorTag }) {
if (!src.length || !(anchorTag instanceof HTMLElement)) return;
if (anchorTag.closest('.marquee, .aside, .hero-marquee') && !anchorTag.hash) anchorTag.hash = '#autoplay';
if (anchorTag.closest('.marquee, .aside, .hero-marquee, .quiz-marquee') && !anchorTag.hash) anchorTag.hash = '#autoplay';
const { dataset, parentElement } = anchorTag;
const video = `<video ${getVideoAttrs(anchorTag.hash, dataset)} data-video-source=${src}></video>`;
anchorTag.insertAdjacentHTML('afterend', video);
Expand Down

0 comments on commit 1bdfd4a

Please sign in to comment.