YouTube Background Playback - Kiwi Browser

Enable YouTube background playback in Kiwi.

< 脚本 YouTube Background Playback - Kiwi Browser 的反馈

评价:好评 - 脚本运行良好

§
发布于:2025-09-14

After below modify, this works great on other mobile browser like via browser and x browser.

On these browser which use android system webview, the userjs injection is too late, so youtube page already register the event listener. So I modify this:

window.addEventListener('visibilitychange', e => e.stopImmediatePropagation(), true);

To this:

window.addEventListener('visibilitychange', e => {
  e.stopImmediatePropagation();
  setTimeout(() => document.querySelector('video').play(), 2000);
}, true);

It restart play after 2 secs of visibilitychange.

This change is tricky, just for fun.

hacker09作者
§
发布于:2025-09-18

Thanks!

发布留言

登录(不可用)以发布留言。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址