fix(player): czarny ekran na galaxyporn to byla 15-sekundowa zaslona
Zgloszenie: "galaxyporn dalej czarny ekran po Loading video". Zdiagnozowalem to wczoraj zle. WebView ma nieprzezroczysta zaslone (coverOverlay z tlem motywu), ktora znika dopiero po SZTYWNYCH 15 sekundach albo wczesniej, gdy uda sie wyluskac adres wideo. Dla hostera, ktory wymaga kliknięcia, znaczy to 15 sekund gapienia sie w spinner, a strony i tak nie widac. Na to naloilem wczoraj wlasny blad: oswajajac strone vikingfile chowalem CALA jej oprawe i zostawialem tylko widget na czarnym tle. Gdy widget sie nie wyrenderowal, po zdjeciu zaslony zostawala czysta czern, czyli gorzej niz przed moja zmiana. Dwie poprawki: - strona vikingfile NIE jest juz chowana, tylko podswietlamy ramke z zabezpieczeniem i przewijamy do niej; najgorszy przypadek to normalna strona hostera - gdy widget sie wyrenderuje, strona melduje to aplikacji (needs_interaction), a ta zdejmuje zaslone OD RAZU, zamiast czekac 15 sekund Podsluch POST-a z bezposrednim linkiem zostaje: gdy zabezpieczenie przejdzie samo, user w ogole nie zobaczy strony, tylko natywny odtwarzacz. Opublikowane OTA na 1.2 i 1.1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
1f73dad7d3
commit
a1717e4b5e
2 changed files with 39 additions and 11 deletions
|
|
@ -16,6 +16,13 @@ export type ChangelogEntry = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CHANGELOG: ChangelogEntry[] = [
|
export const CHANGELOG: ChangelogEntry[] = [
|
||||||
|
{
|
||||||
|
id: '2026-08-22c',
|
||||||
|
date: 'August 2026',
|
||||||
|
items: [
|
||||||
|
'Fixed the black screen on older galaxyporn scenes. The player was covering the host page for a fixed 15 seconds, so by the time anything appeared there was nothing left to see. Now the page shows the moment it needs you, and when the app can grab the video file itself it skips the page entirely and plays it in the normal player.',
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: '2026-08-22b',
|
id: '2026-08-22b',
|
||||||
date: 'August 2026',
|
date: 'August 2026',
|
||||||
|
|
|
||||||
|
|
@ -1167,30 +1167,44 @@ const INJECTED_JS = `
|
||||||
// na natywny odtwarzacz, gdy tylko pojawi sie adres pliku.
|
// na natywny odtwarzacz, gdy tylko pojawi sie adres pliku.
|
||||||
try {
|
try {
|
||||||
if (/(^|\\.)vikingfile\\.com$/i.test(location.hostname)) {
|
if (/(^|\\.)vikingfile\\.com$/i.test(location.hostname)) {
|
||||||
|
// UWAGA: NIE chowamy tu reszty strony. Pierwsza wersja robila dokladnie to i user
|
||||||
|
// dostawal CZARNY EKRAN zamiast pustej strony, bo gdy widget zabezpieczenia sie nie
|
||||||
|
// wyrenderuje, na czarnym tle nie zostaje juz nic. Gorsze niz stan wyjsciowy. Teraz
|
||||||
|
// tylko podswietlamy wlasciwe miejsce i przewijamy do niego, wiec najgorszy przypadek
|
||||||
|
// to normalna strona hostera, czyli to, co user widzial przed ta zmiana.
|
||||||
var vkCss = document.createElement('style');
|
var vkCss = document.createElement('style');
|
||||||
vkCss.textContent = [
|
vkCss.textContent = [
|
||||||
'html,body{background:#000!important;margin:0!important;padding:0!important}',
|
'#captcha-download{outline:2px solid #e05a6d!important;border-radius:10px!important;',
|
||||||
'#logo,#toggle-theme,footer,#file-information,#progress-current,#archive,',
|
'padding:14px!important;margin:12px auto!important;max-width:520px!important}',
|
||||||
'#embed-code,#download-parallel,#download-parallel-progress{display:none!important}',
|
'#goon-vk-hint{color:#e05a6d;font:600 15px system-ui,sans-serif;text-align:center;',
|
||||||
'.page-container,.content-wrap{max-width:100%!important;margin:0!important;padding:0!important}',
|
'padding:8px 0}',
|
||||||
'#captcha-download{display:flex!important;flex-direction:column!important;',
|
'video:not(.hidden){width:100vw!important;max-height:100vh!important;background:#000!important}',
|
||||||
'align-items:center!important;justify-content:center!important;',
|
|
||||||
'min-height:100vh!important;gap:14px!important}',
|
|
||||||
'#goon-vk-hint{color:#fff;font:600 15px system-ui,sans-serif;text-align:center;padding:0 24px}',
|
|
||||||
'video{width:100vw!important;max-height:100vh!important;background:#000!important}',
|
|
||||||
].join('');
|
].join('');
|
||||||
(document.head || document.documentElement).appendChild(vkCss);
|
(document.head || document.documentElement).appendChild(vkCss);
|
||||||
|
var vkScrolled = false;
|
||||||
var vkReady = function() {
|
var vkReady = function() {
|
||||||
var box = document.getElementById('captcha-download');
|
var box = document.getElementById('captcha-download');
|
||||||
if (box && !document.getElementById('goon-vk-hint')) {
|
if (box && !document.getElementById('goon-vk-hint')) {
|
||||||
var hint = document.createElement('div');
|
var hint = document.createElement('div');
|
||||||
hint.id = 'goon-vk-hint';
|
hint.id = 'goon-vk-hint';
|
||||||
hint.textContent = 'Tap the checkbox to start the video';
|
hint.textContent = 'Tap the box below to start the video';
|
||||||
box.insertBefore(hint, box.firstChild);
|
box.insertBefore(hint, box.firstChild);
|
||||||
}
|
}
|
||||||
|
if (box && !vkScrolled) {
|
||||||
|
vkScrolled = true;
|
||||||
|
try { box.scrollIntoView({ block: 'center' }); } catch (e) {}
|
||||||
|
}
|
||||||
|
// Nakladka "Loading video..." zaslania strone przez 15 sekund. Dla hostera, ktory
|
||||||
|
// WYMAGA kliknięcia, to znaczy 15 sekund gapienia sie w spinner, a potem dopiero
|
||||||
|
// szansa na interakcje. Gdy widget zabezpieczenia sie wyrenderuje, mowimy o tym
|
||||||
|
// aplikacji, zeby zdjela nakladke od razu.
|
||||||
|
var cap = document.getElementById('captcha');
|
||||||
|
if (cap && cap.innerHTML !== '' && !window.__goonVkAsked && window.ReactNativeWebView) {
|
||||||
|
window.__goonVkAsked = true;
|
||||||
|
window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'needs_interaction' }));
|
||||||
|
}
|
||||||
var v = document.querySelector('video');
|
var v = document.querySelector('video');
|
||||||
if (v && v.className.indexOf('hidden') === -1) {
|
if (v && v.className.indexOf('hidden') === -1) {
|
||||||
if (box) box.style.display = 'none';
|
|
||||||
var vc = document.getElementById('video-container');
|
var vc = document.getElementById('video-container');
|
||||||
if (vc) vc.style.cssText = 'position:fixed;inset:0;z-index:99999;background:#000';
|
if (vc) vc.style.cssText = 'position:fixed;inset:0;z-index:99999;background:#000';
|
||||||
}
|
}
|
||||||
|
|
@ -1839,6 +1853,13 @@ function EmbedWebViewPlayer({ params }: { params: RouteParams }) {
|
||||||
if (isLikelyAd(data.url)) return;
|
if (isLikelyAd(data.url)) return;
|
||||||
setExtractedUrl((curr) => curr ?? data.url);
|
setExtractedUrl((curr) => curr ?? data.url);
|
||||||
}
|
}
|
||||||
|
// Strona zglasza, ze czeka na klikniecie (widget zabezpieczenia sie wyrenderowal).
|
||||||
|
// Zdejmujemy zaslone OD RAZU zamiast po 15 sekundach, inaczej user gapi sie w
|
||||||
|
// spinner, a potem i tak musi kliknac. Zgloszenie: "galaxyporn czarny ekran po
|
||||||
|
// Loading video".
|
||||||
|
if (data.type === 'needs_interaction') {
|
||||||
|
setRevealEmbed(true);
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// not JSON
|
// not JSON
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue