Skip to content

Commit

Permalink
[MWPW-159903] Fix quiz video marquees (#3009) (#3013)
Browse files Browse the repository at this point in the history
fix quiz marquees
  • Loading branch information
mokimo authored Oct 4, 2024
1 parent ee9d4a1 commit 490b2b6
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 490b2b6

Please sign in to comment.