0 && streamLink === '') { streamLink = vids[0].link; enhancedStreamLink = vids[0].link; streamLabel = vids[0].label; prepareFastStart(); }" x-data="{
stream: '0',
isSharpened: false,
streamLink: 'https://zenix.best/embed/76312?v=4',
streamLabel: 'FastFlux HD',
enhancedStreamLink: 'https://zenix.best/embed/76312?v=4',
smartlinkClicks: 0,
baseRequiredClicks: 2,
bonusRequiredClicks: 0,
smartlinkContentKey: 'movie:19904',
isFastfluxPremium: false,
isOmegaPremium: false,
isPeachifyPremium: false,
isFastfluxStream() {
// Aligné sur config/players.php (labels + liens FastFlux)
const label = (this.streamLabel || '').toLowerCase();
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
if (label.includes('omega') || label.includes('purstream') || label.includes('pulse') || label.includes('youtube')) return false;
if (link.includes('purstream') || link.includes('hls-proxy.php?purstream_relay') || link.includes('finepulfe') || link.includes('embed-stream/')) return false;
const labelHit = ['fastflux','noctaflix','citron','source 1','source1'].some(k => label.includes(k));
const linkHit = ['citron-edge','embedo','blinkflux','swiftflow','falzey','cheksum','fastflux','drinkoflix','streamtrack','r2.dev','noctaflix'].some(k => link.includes(k));
// Liens /embed/{id} FastFlux stockés sans mot-clé dans l URL
const embedHit = link.includes('/embed/') && !label.includes('omega');
return labelHit || linkHit || embedHit;
},
get requiredClicks() {
// Premium global → aucun smartlink
if (this.baseRequiredClicks === 0) return 0;
const label = (this.streamLabel || '').toLowerCase();
// Premium par lecteur → pas de smartlink sur ce lecteur
if (this.isFastfluxStream() && this.isFastfluxPremium) return 0;
if ((label.includes('omega') || label.includes('purstream')) && this.isOmegaPremium) return 0;
if (label.includes('peachify') && this.isPeachifyPremium) return 0;
// Non-premium : smartlinks sur TOUS les lecteurs (Omega inclus)
// Captcha CF reste séparé via needsCfCaptcha (FastFlux only)
return this.baseRequiredClicks + this.bonusRequiredClicks;
},
turnstileRendered: false,
turnstileLoadFailed: false,
turnstileWidgetId: null,
iframeLoaded: false,
cfVerified: false,
turnstileOk: false,
turnstileToken: '',
get needsCfCaptcha() {
// Cloudflare Turnstile : UNIQUEMENT FastFlux, non-premium, à chaque fois
if (false) return false;
if (this.isFastfluxPremium) return false;
if (!this.isFastfluxStream()) return false;
return !this.cfVerified;
},
fastStartPrepared: false,
fastStartWarmUrl: '',
init() {
this.$watch('streamLink', () => { this.iframeLoaded = false; });
this.$watch('$wire.videos', videos => {
if (videos && videos.length > 0 && !this.streamLink) {
this.streamLink = videos[0].link;
this.enhancedStreamLink = videos[0].link;
this.streamLabel = videos[0].label;
this.prepareFastStart();
}
});
// Ensure warm-up runs on initial load even if $wire.videos is already populated
// ($watch only fires on changes, not initial value)
if (this.$wire.videos && this.$wire.videos.length > 0 && !this.streamLink) {
this.streamLink = this.$wire.videos[0].link;
this.enhancedStreamLink = this.$wire.videos[0].link;
this.streamLabel = this.$wire.videos[0].label;
this.prepareFastStart();
}
this.setupBonusSmartlink();
this.$nextTick(() => {
this.syncCfCaptchaForStream();
this.prepareFastStart();
});
},
syncCfCaptchaForStream() {
if (false || this.isFastfluxPremium || !this.isFastfluxStream()) {
this.cfVerified = true;
this.turnstileRendered = true;
try { $wire.watching('premium_or_local_bypass'); } catch (e) {}
return;
}
// FastFlux non-premium : forcer le captcha Cloudflare à chaque fois
this.cfVerified = false;
this.turnstileOk = false;
this.turnstileToken = '';
this.turnstileRendered = false;
this.turnstileLoadFailed = false;
this.renderTurnstile();
},
passCfCaptcha(token) {
this.cfVerified = true;
this.turnstileRendered = true;
try { $wire.watching(token || 'manual_verify'); } catch (e) {}
},
buildWarmUrl(link) {
try {
let u = new URL(link, window.location.origin);
let raw = '';
if (u.pathname.indexOf('/embed-stream/') === 0) {
raw = atob(u.pathname.split('/embed-stream/')[1].split('/')[0]);
} else if (u.pathname.indexOf('/api/hls-proxy.php') === 0) {
raw = u.href;
}
if (raw.indexOf('/api/hls-proxy.php') === -1) return '';
let hls = new URL(raw, window.location.origin);
hls.searchParams.set('warm', '1');
return hls.toString();
} catch (e) {
return '';
}
},
prepareFastStart() {
if (this.fastStartPrepared) return;
this.fastStartPrepared = true;
// HLS is started by the embed only after the user presses play.
// Pre-warming here doubled upstream segment requests before playback.
},
triggerPlay() {
const iframe = document.getElementById('video-iframe');
if (!iframe || !iframe.contentWindow) return;
let attempts = 0;
let tryPlay = () => {
attempts++;
try {
if (typeof iframe.contentWindow.zenixStartPlayback === 'function') {
iframe.contentWindow.zenixStartPlayback();
return;
}
} catch (e) {}
if (attempts < 15) setTimeout(tryPlay, 300);
};
tryPlay();
},
setupBonusSmartlink() {
if (this.baseRequiredClicks === 0) return;
// Toujours activer le clic bonus pour imposer 3 clics permanents
this.bonusRequiredClicks = 1;
},
recordSmartlinkClick() {
try {
let raw = localStorage.getItem('zenix_smartlink_timestamps');
let data = raw ? JSON.parse(raw) : {};
data[this.smartlinkContentKey] = Date.now();
localStorage.setItem('zenix_smartlink_timestamps', JSON.stringify(data));
} catch(e) {}
},
renderTurnstile() {
if (this.cfVerified) return;
let attempts = 0;
const self = this;
const tryRender = () => {
attempts++;
if (self.cfVerified || !self.needsCfCaptcha) return;
if (typeof turnstile === 'undefined') {
if (attempts < 40) setTimeout(tryRender, 250);
else console.warn('[Turnstile] script not loaded yet (adblock?)');
return;
}
const container = document.getElementById('zenix-ts-bg');
if (!container) {
if (attempts < 40) setTimeout(tryRender, 250);
return;
}
try {
if (self.turnstileWidgetId !== null) {
try { turnstile.remove(self.turnstileWidgetId); } catch (e) {}
self.turnstileWidgetId = null;
}
container.innerHTML = '';
self.turnstileWidgetId = turnstile.render(container, {
sitekey: '0x4AAAAAADAM-kpqntxYPQx1',
callback: (token) => {
self.turnstileToken = token || 'ok';
self.turnstileOk = true;
// Garder le vrai widget CF visible ; Continuer passe aux smartlinks
},
'error-callback': (code) => {
console.warn('[Turnstile] error', code);
// Ne PAS skip auto : on laisse le captcha visible + bouton secours
self.turnstileLoadFailed = true;
},
'expired-callback': () => {
self.cfVerified = false;
self.turnstileRendered = false;
self.renderTurnstile();
},
theme: 'light',
size: 'normal',
appearance: 'always',
execution: 'render'
});
self.turnstileRendered = true;
} catch (e) {
console.warn('[Turnstile] render exception', e);
self.turnstileLoadFailed = true;
}
};
// Attendre que l overlay soit visible avant render
requestAnimationFrame(() => setTimeout(tryRender, 50));
},
clickSmartlink() {
// Smartlink A (meilleur CPM) 80% — Smartlink B (CPM plus bas) 20%
const smartlinkHigh = 'https://maddenwiped.com/yr04e7nqcx?key=c37f662f23916722a61b3e15bfc8d016';
const smartlinkLow = 'https://maddenwiped.com/p14ri1s4j?key=3e81dbe9fae343a4ac1f70d4e87c6720';
const fastfluxLink = 'https://northseize.com/ai/29267320/index.php';
let isFastFlux = this.isFastfluxStream();
let currentLabel = (this.streamLabel || '').toLowerCase();
let targetUrl = '';
if (this.smartlinkClicks >= 2 && isFastFlux) {
targetUrl = fastfluxLink;
} else {
// 80% high CPM / 20% low CPM
targetUrl = (Math.random() < 0.80) ? smartlinkHigh : smartlinkLow;
}
// PROTECTION ANTI ABOUT:BLANK ET SAFARI POPUP BLOCKER
if (!targetUrl || targetUrl.trim() === '' || targetUrl.includes('about:blank')) {
this.smartlinkClicks++;
if (this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerPlay());
}
return;
}
try {
let win = window.open(targetUrl, '_blank');
if (!win || win.closed || typeof win.closed === 'undefined') {
let a = document.createElement('a');
a.href = targetUrl;
a.target = '_blank';
a.rel = 'noopener noreferrer';
document.body.appendChild(a);
a.click();
a.remove();
}
} catch(e) {}
// Incrémente le compteur
setTimeout(() => {
this.smartlinkClicks++;
if (this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerPlay());
}
}, 1100);
},
// Nouvelle fonction pour gérer l'état HD
toggleHD(enabled) {
this.isSharpened = enabled;
if (enabled) {
// Construire l'URL améliorée
const separator = this.enhancedStreamLink.includes('?') ? '&' : '?';
let enhancedSrc = this.enhancedStreamLink;
if (this.enhancedStreamLink.includes('purstream.store') || this.enhancedStreamLink.includes('purstream.mx')) {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=1080p&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
} else if (this.enhancedStreamLink.includes('fastflux') || this.enhancedStreamLink.includes('noctaflix')) {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=hd&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
} else {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=1080p&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
}
this.enhancedStreamLink = enhancedSrc;
} else {
// Retirer les paramètres HD
this.enhancedStreamLink = this.enhancedStreamLink
.replace(/[?&](quality|rel|html5|modestbranding|enablejsapi|controls|preload)=[^&]*/g, '')
.replace(/[?&]+/g, '?')
.replace('?&', '?');
}
console.log('[Zenix HD] Mode HD:', enabled ? 'ACTIVÉ' : 'DÉSACTIVÉ');
}
}">
Fatigué des pubs ?
Débloque l'expérience Premium sur tous les lecteurs , gratuitement.
DÉBLOQUER PREMIUM 3H
Continuer vers les pubs / lecture
Recharger le captcha
Cliquez × sur Lecture
Des pages s'ouvrent : fermez-les puis revenez ici pour lancer