mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Autoplay false for twitch.tv video rich embed
This commit is contained in:
parent
e6e972682f
commit
e8af58206c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user