Commit 42341354 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Apply autoplay prevention evasion also for Video tags

They are typically added to the DOM (a video the user can't see isn't very useful),
but in case the website just renders the video offscreen into a texture, our brief
DOM dance will still cause trouble.
parent 5e2d4907
......@@ -889,12 +889,9 @@ function loadMediaSessionsShim() {
const tagName = arguments[0];
if (typeof tagName === "string") {
if (tagName.toLowerCase() === "audio") {
if (tagName.toLowerCase() === "audio" || tagName.toLowerCase() === "video") {
const player = createdTag;
${addPlayerToDomEvadingAutoPlayBlocking}
} else if (tagName.toLowerCase() === "video") {
(document.head || document.documentElement).appendChild(createdTag);
createdTag.parentNode.removeChild(createdTag);
}
}
`;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment