Skip to content

Commit

Permalink
Remove handling of mp4 files
Browse files Browse the repository at this point in the history
  • Loading branch information
makotech222 committed Feb 13, 2023
1 parent 5f468f1 commit 4d0d280
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,7 @@ function setupMarkdown() {
return defaultRenderer?.(tokens, idx, options, env, self) ?? "";
}
const alt_text = item.content;
const isAnimated = src.endsWith(".mp4")
if (!isAnimated)
return `<img class="icon icon-emoji" src="${src}" title="${title}" alt="${alt_text}"/>`;
else
return `
<video class="icon icon-emoji" autoplay loop title="${title}" alt="${alt_text}">
<source type="video/mp4" src="${src}"></source>
Your browser does not support playing HTML5 video. You can
<a href="${src}" download>download a copy of the video file</a> instead.
</video>`;
return `<img class="icon icon-emoji" src="${src}" title="${title}" alt="${alt_text}"/>`;
}
}

Expand Down

0 comments on commit 4d0d280

Please sign in to comment.