Greasy Fork is available in English.

HiAnime Auto 1080p

Automatically sets your Quality & Speed to your desired values, Auto Fullscreen, Auto Pause/Unpause when switching tabs, Auto Unmute.

< Відгуки до HiAnime Auto 1080p

Відгук: Добре - скрипт працює добре

§
Опубліковано: 29.09.2024
Edited: 29.09.2024

Also this is a much snappier implimentation

var LastPlayingState = false;
window.addEventListener("focus", () => {
if (LastPlayingState) {
jwplayer().play();
}
});

window.addEventListener("blur", () => {
if (jwplayer().getState() === "paused") {
LastPlayingState = false;
} else {
LastPlayingState = true;
}
jwplayer().pause();
});

§
Опубліковано: 29.09.2024

var LastPlayingState = false;
window.addEventListener("focus", () => {
if (LastPlayingState == true) {
jwplayer().play();
}
});

window.addEventListener("blur", () => {
LastPlayingState = jwplayer().getState() == "playing";
jwplayer().pause();
});

GhosteАвтор
§
Опубліковано: 29.09.2024

this was the first thing i tried actually, the problem is that if you click away from the iframe on the hianime page, it pauses and if you click on it again, it unpauses.

this is why i didnt use it.

Опублікувати відповідь

Sign in to post a reply.