feat(mobile): auto-accept age-gate modal in WebView fallback
4k69 (and similar) show an "Are you 18 or above? Yes/No" modal that blocks the jwplayer from initialising, so the WebView fallback never extracts a stream. Click the age-gate accept button by id (#pop_up_18_yes and id*=18_yes/age_yes variants) on the same loop as the consent/play-poster auto-clickers. Verified on emulator: 4k69 age-gate clears and the player initialises (ExoPlayer hands off). A VAST preroll is still grabbed instead of the okcdn content for 4k69 specifically (report 5de3fbc5 stays open) - separate ad-filter work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
08410fddd1
commit
2a9445fe4a
1 changed files with 11 additions and 1 deletions
|
|
@ -1010,14 +1010,24 @@ const INJECTED_JS = `
|
|||
}
|
||||
};
|
||||
|
||||
// Age-gate auto-accept: 4k69 ma modal "Are you 18 or above?" z przyciskiem
|
||||
// \`#pop_up_18_yes\`, który blokuje init jwplayera → INJECTED_JS nie wyłuska
|
||||
// streamu (report 5de3fbc5). Klik precyzyjnie po id — jednoznaczne, bezpieczne.
|
||||
const dismissAgeGate = function() {
|
||||
const btn = document.querySelector('#pop_up_18_yes, [id*="18_yes"], [id*="age_yes"], [id*="ageyes"]');
|
||||
if (btn) { try { btn.click(); } catch (e) {} }
|
||||
};
|
||||
|
||||
setInterval(function() {
|
||||
removeAdIframes();
|
||||
dismissConsent();
|
||||
dismissAgeGate();
|
||||
clickPlayPoster();
|
||||
}, 1000);
|
||||
// Pierwsza próba consent natychmiast (banner bywa w SSR HTML) — bez czekania
|
||||
// Pierwsza próba consent/age-gate natychmiast (modal bywa w SSR HTML) — bez czekania
|
||||
// na pierwszy tick interwału.
|
||||
dismissConsent();
|
||||
dismissAgeGate();
|
||||
|
||||
// -- 2. Auto-extract m3u8/mp4 -----------------------------------------------
|
||||
const VIDEO_RE = /https?:\\/\\/[^"'\\s<>]+\\.(?:m3u8|mp4|mpd)(?:\\?[^"'\\s<>]*)?/i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue