Skip to content

Commit

Permalink
[invidivizer] always disable autoplay
Browse files Browse the repository at this point in the history
  • Loading branch information
ioj4 authored and yellowsink committed Jan 12, 2025
1 parent f9435cb commit f961288
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/invidivizer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,17 @@ function handleDispatch(payload) {

const embPath = tsMatch?.[0] ? match[1] + "?" + tsMatch[0] : match[1];

const newSrc = new URL(`https://${store.instance}/embed/${embPath}`);

// see https://docs.invidious.io/url-parameters/
newSrc.searchParams.set("autoplay", 0);

e.style.display = "none";
e.insertAdjacentElement(
"afterend",
<iframe
style="border: 0; width: 100%; max-width: 600px; aspect-ratio: 16/9"
src={`https://${store.instance}/embed/${embPath}`}
src={newSrc.toString()}
allow="fullscreen"
/>,
);
Expand Down

0 comments on commit f961288

Please sign in to comment.