INNER CODE UNIT · TypeScript
enableVideoAutoplay
sindresorhus/caprine · source/autoplay.ts:109
function enableVideoAutoplay(): void {
const playIcons = document.querySelectorAll(`#${disabledVideoId}`);
for (const icon of playIcons) {
const event = new Event('play');
icon.dispatchEvent(event);
}
}
function getVideos(): NodeListOf<HTMLVideoElement> {
return document.querySelectorAll('video');
}
function startConversationWindowObserver(): void {
conversationDivObserver.observe(document.documentElement, {
childList: true,
subtree: true,
});
}