Sosyal Dünyanın
Yeni Nesil X Noktası

22 yıllık tutku, yapay zeka ve yerel sosyal topluluklarla yeniden doğuyor.

Dikkat: Bağımlılık Yapar!

En Popüler Sohbet Odaları

Yapay Zeka & Trend Kanallar

AI Sohbet Karakterleri

Yüzlerce farklı karaktere sahip yapay zeka botları ile hemen sohbete başlayın. Teknoloji ile sosyal dünyayı birleştiriyoruz.

Finans & Borsa Sohbetleri

Piyasaları takip eden, analiz yapan ve tecrübelerini paylaşan devasa bir yatırımcı topluluğuna katılın.

Günlük Burç Yorumları

Koç
Boğa
İkizler
Yengeç
Aslan
Başak
Terazi
Akrep
Yay
Oğlak
Kova
Balık
// --- RADIO PLAYER LOGIC (Remaining for now) --- let stations = []; let currentStationIndex = 0; let isRadioPlaying = false; const player = document.getElementById('radioPlayer'); // API Nodes const apiHosts = [ "https://de1.api.radio-browser.info", "https://nl1.api.radio-browser.info", "https://at1.api.radio-browser.info" ]; // Hardcoded Reliable Streams (SSL) const hardcodedStations = [ { name: "Kral Pop", url: "https://kralpop.canliyayinda.com/kralpop/128/icecast.audio", tags: "pop,hit" }, { name: "Power Türk", url: "https://listen.powerapp.com.tr/powerturk/mpeg/icecast.audio", tags: "turkce,pop" }, { name: "Joy Türk", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/JOY_TURK_SC", tags: "turkce,slow" }, { name: "Number One", url: "https://n10101m.mediatriple.net/numberone", tags: "hit,foreign" }, { name: "Arabesk Damar FM", url: "https://yayin.damarfm.com:8080/damarfm", tags: "arabesk" } ]; async function searchRadio() { // Determine tag based on current room logic let tag = 'turkey'; const path = window.location.pathname; const segments = path.split('/').filter(p => p.length > 0 && p !== 'sohbet' && p !== 'sohbetx'); if (segments.length > 0) { tag = segments[segments.length - 1]; // Use last segment as likely city/category } else if (typeof currentRoom !== 'undefined' && currentRoom !== 'Genel' && currentRoom !== 'Sohbet') { tag = currentRoom.toLowerCase().replace(/[^a-z0-9]/g, ''); } if (tag.length < 3) tag = 'turkey'; console.log(`Searching radio for tag: ${tag}`); updateRadioUI(`📡 ${tag.toUpperCase()} Taranıyor...`); try { let result = await fetchStations(tag); // STRONG FALLBACK: If less than 2 stations found for tag, immediately search 'turkey' if (result.length < 2 && tag !== 'turkey') { console.log("Fallback to Turkey top list."); const fallback = await fetchStations('turkey'); result = [...result, ...fallback]; } // Filter for HTTPS (Mixed Content Block prevention) AND playable extensions stations = result.filter(s => s.url_resolved && s.url_resolved.startsWith('https')); // Append Hardcoded Stations to the end just in case stations = [...stations, ...hardcodedStations]; if (stations.length > 0) { // If the first station is unreliable (API often has broken links), maybe prioritize hardcoded if 'turkey' if (tag === 'turkey' || stations.length < 3) { // Move hardcoded to top if API results are weak stations.unshift(hardcodedStations[0]); stations.unshift(hardcodedStations[1]); // Remove duplicates by URL stations = stations.filter((v, i, a) => a.findIndex(v2 => (v2.url === v.url)) === i); } loadStation(0); setTimeout(() => updateRadioUI(stations[0].name), 500); } else { // Total failure -> Use Kral Pop stations = hardcodedStations; loadStation(0); updateRadioUI(stations[0].name); } } catch (e) { console.error("Radio Error:", e); // Default Hardcoded Fallback stations = hardcodedStations; loadStation(0); updateRadioUI(stations[0].name); } } async function fetchStations(tag) { // Use a random host to balance load const host = apiHosts[Math.floor(Math.random() * apiHosts.length)]; const url = `${host}/json/stations/search?tag=${encodeURIComponent(tag)}&limit=10&order=clickcount&reverse=true&hidebroken=true`; try { const resp = await fetch(url); return await resp.json(); } catch (e) { return []; } } function loadStation(index) { if (stations.length === 0) return; currentStationIndex = index; const s = stations[index]; // Prefer resolved URL, fallback to direct url, fallback to hardcoded url property player.src = s.url_resolved || s.url; updateRadioUI(s.name); if (isRadioPlaying) { const playPromise = player.play(); if (playPromise !== undefined) { playPromise.catch(error => { console.log("Auto-play prevented"); togglePlay(); // Revert to paused state }); } } } function togglePlay() { if (!player.src) { loadStation(0); } const btn = document.getElementById('embedPlayBtn'); if (player.paused) { player.play().catch(e => { console.error("Play failed:", e); // If play failed, maybe stream is dead, try next nextStation(); }); isRadioPlaying = true; btn.innerHTML = ''; setTimeout(() => lucide.createIcons(), 50); } else { player.pause(); isRadioPlaying = false; btn.innerHTML = ''; setTimeout(() => lucide.createIcons(), 50); } } function nextStation() { let next = currentStationIndex + 1; if (next >= stations.length) next = 0; loadStation(next); if (isRadioPlaying) { player.play(); } } function prevStation() { let prev = currentStationIndex - 1; if (prev < 0) prev = stations.length - 1; loadStation(prev); if (isRadioPlaying) { player.play(); } } function updateRadioUI(title) { const display = document.getElementById('radioDisplay'); if (display) display.innerText = title; } // Initialize logic window.addEventListener('load', () => { setTimeout(searchRadio, 1000); });