mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-15 19:05:25 +02:00
Autoplay false for twitch.tv video rich embed
This commit is contained in:
@ -1387,6 +1387,15 @@
|
||||
disembed.isVideo = false;
|
||||
if (disembed.type == "video") {
|
||||
disembed.isVideo = true;
|
||||
if (disembed.video) {
|
||||
var url = new URL(disembed.video.url);
|
||||
if (url.hostname.endsWith("twitch.tv")) {
|
||||
if (url.searchParams.has("autoplay")) {
|
||||
url.searchParams.set("autoplay", "false");
|
||||
disembed.video.url = url.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
disembed.toRenderFooter = false;
|
||||
if (disembed.footer) {
|
||||
|
Reference in New Issue
Block a user