YouTube Background Playback - Kiwi Browser

Enable YouTube background playback in Kiwi.

< Feedback on YouTube Background Playback - Kiwi Browser

Review: चांगली - स्क्रिप्ट चालते

§
पोस्ट केले: 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!

उत्तर पोस्ट करा

उत्तर पोस्ट करण्यासाठी साइन इन करा.

长期地址
遇到问题?请前往 GitHub 提 Issues。