Welcome to Flatcast.Biz

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

BILGI Radyo Player

saf köylü

Moderator
Yönetici
Moderator
Katılım
19 Ağu 2025
Mesajlar
2
Reaksiyon puanı
1
Puanları
10
Konum
dünya
Web sitesi
frontend-develope.blogspot.com
Ekran%20g%C3%B6r%C3%BCnt%C3%BCs%C3%BC%202025-08-31%20013435.jpg


<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body, html {
margin: 0;
padding: 0;
background: #222;
font-family: 'Courier New', Courier, monospace;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
color: #00ffc8;
}

.winamp-container {
width: 480px;
background: #333;
border: 1px solid #555;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
padding: 5px;
font-size: 12px;
letter-spacing: 1px;
}

.winamp-header {
background: #000;
padding: 5px;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #111;
margin-bottom: 5px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.winamp-header-left {
display: flex;
align-items: center;
gap: 10px;
}

.winamp-logo {
font-size: 14px;
font-weight: bold;
color: #00ffc8;
}

.winamp-radio-name {
font-size: 14px;
font-weight: bold;
color: #fff;
text-shadow: 0 0 5px #fff;
margin-left: 10px;
}

.winamp-time {
color: #00ffc8;
font-size: 14px;
text-shadow: 0 0 5px #00ffc8;
}

.winamp-marquee {
flex-grow: 1;
background: #000;
border: 1px solid #111;
overflow: hidden;
white-space: nowrap;
height: 20px;
line-height: 20px;
margin: 0 10px;
position: relative;
}

.winamp-marquee-text {
display: inline-block;
padding-left: 100%;
animation: winamp-scroll 15s linear infinite;
animation-play-state: paused;
}

.winamp-marquee-text.playing {
animation-play-state: running;
}

@keyframes winamp-scroll {
0% { transform: translateX(0%); }
100% { transform: translateX(-100%); }
}

.winamp-controls {
display: flex;
justify-content: space-between;
align-items: center;
gap: 5px;
margin-top: 5px;
}

.winamp-buttons {
display: flex;
gap: 5px;
}

.winamp-btn {
background: #222;
border: 1px solid #111;
color: #00ffc8;
padding: 8px 12px;
cursor: pointer;
box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.1);
transition: all 0.1s ease;
}

.winamp-btn:hover {
box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3);
background: #444;
}

.winamp-btn:active {
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
transform: translateY(1px);
}

.winamp-slider-container {
display: flex;
align-items: center;
gap: 5px;
}

.winamp-volume {
-webkit-appearance: none;
appearance: none;
width: 100px;
height: 5px;
background: #000;
border: 1px solid #111;
border-radius: 2px;
outline: none;
cursor: pointer;
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.winamp-volume::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 12px;
height: 12px;
background: #00ffc8;
border: 1px solid #000;
cursor: pointer;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.winamp-visuals {
display: flex;
gap: 5px;
align-items: center;
margin-top: 5px;
height: 40px;
}

.winamp-equalizer {
flex-grow: 1;
height: 100%;
display: flex;
justify-content: space-between;
align-items: flex-end;
border: 1px solid #111;
background: #000;
padding: 5px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
box-sizing: border-box;
}

.eq-bar {
width: 3px;
height: 3px;
background: #00ffc8;
border-radius: 1px;
transition: height 0.1s ease-out;
box-shadow: 0 0 3px #00ffc8;
max-height: 25px;
}

.winamp-cd-wrapper {
width: 40px;
height: 100%;
border: 1px solid #111;
background: #000;
display: flex;
justify-content: center;
align-items: center;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
box-sizing: border-box;
}

.cd-icon {
width: 30px;
height: 30px;
background: #444;
border-radius: 50%;
position: relative;
animation: spin-cd 2s linear infinite;
animation-play-state: paused;
}

.cd-icon.playing {
animation-play-state: running;
}

.cd-icon::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
background: #00ffc8;
border-radius: 50%;
border: 2px solid #000;
}

.cd-icon::before {
content: '';
position: absolute;
top: 3px;
right: 3px;
width: 4px;
height: 4px;
background: #ccc;
border-radius: 50%;
box-shadow: 0 0 3px #fff;
}

@keyframes spin-cd {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.spinner {
border: 3px solid rgba(0, 255, 200, 0.3);
border-top: 3px solid #00ffc8;
border-radius: 50%;
width: 18px;
height: 18px;
animation: spin 1s linear infinite;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>

<div class="winamp-container">
<div class="winamp-header">
<div class="winamp-header-left">
<div class="winamp-logo">D.Y</div>
<div class="winamp-radio-name">Flatcast Biz</div>
</div>
<div class="winamp-marquee">
<span class="winamp-marquee-text" id="stream-info">RADYO YAYINI YÜKLENİYOR...</span>
</div>
</div>

<div class="winamp-visuals">
<div class="winamp-equalizer" id="equalizer"></div>
<div class="winamp-cd-wrapper">
<div class="cd-icon" id="cd-icon"></div>
</div>
</div>

<div class="winamp-controls">
<div class="winamp-buttons">
<button class="winamp-btn" id="play-pause-btn">▶</button>
<button class="winamp-btn" id="stop-btn">◼</button>
<button class="winamp-btn" id="fast-forward-btn">▶▶</button>
<button class="winamp-btn" id="rewind-btn">◀◀</button>
</div>
<div class="winamp-slider-container">
<div style="width: 15px; text-align: right;">Vol</div>
<input type="range" class="winamp-volume" id="volume-slider" min="0" max="1" step="0.01">
</div>
</div>

<audio id="radio-audio" crossorigin="anonymous">
<source src=" " type="audio/mpeg">
</audio>

<div style="display: none;">
<a href=" " class="cc_streaminfo" data-type="song" data-username="ataradyo">Yükleniyor...</a>
<script src=" "></script>
</div>
</div>

<script>
const radioAudio = document.getElementById('radio-audio');
const playPauseBtn = document.getElementById('play-pause-btn');
const stopBtn = document.getElementById('stop-btn');
const fastForwardBtn = document.getElementById('fast-forward-btn');
const rewindBtn = document.getElementById('rewind-btn');
const volumeSlider = document.getElementById('volume-slider');
const equalizer = document.getElementById('equalizer');
const streamInfo = document.getElementById('stream-info');
const cdIcon = document.getElementById('cd-icon');

let audioContext, analyser, source, dataArray;
const barCount = 40;
let isPlaying = false;

function setupAudioContext() {
if (!audioContext) {
audioContext = new (window.AudioContext || window.webkitAudioContext)();
analyser = audioContext.createAnalyser();
source = audioContext.createMediaElementSource(radioAudio);
source.connect(analyser);
analyser.connect(audioContext.destination);
analyser.fftSize = 256;
dataArray = new Uint8Array(analyser.frequencyBinCount);
}
}

function createBars() {
for (let i = 0; i < barCount; i++) {
let bar = document.createElement('div');
bar.classList.add('eq-bar');
equalizer.appendChild(bar);
}
}
createBars();

function animateEqualizer() {
if (!analyser || radioAudio.paused) {
const bars = equalizer.querySelectorAll('.eq-bar');
bars.forEach(bar => {
bar.style.height = '3px';
bar.style.background = '#00ffc8';
});
return;
}

requestAnimationFrame(animateEqualizer);

analyser.getByteFrequencyData(dataArray);
const bars = equalizer.querySelectorAll('.eq-bar');
const totalBars = bars.length;

for (let i = 0; i < totalBars; i++) {
const bar = bars;
const index = Math.floor((i / totalBars) * dataArray.length);
const value = dataArray[index];
const normalizedValue = value / 255;
const height = normalizedValue * 25;

bar.style.height = `${Math.max(3, height)}px`;
bar.style.background = `hsl(${150 + normalizedValue * 100}, 100%, 50%)`;
}
}

function showSpinner() {
playPauseBtn.innerHTML = '<div class="spinner"></div>';
}

function hideSpinner() {
if (radioAudio.paused) {
playPauseBtn.innerHTML = '▶';
} else {
playPauseBtn.innerHTML = '❚❚';
}
}

playPauseBtn.onclick = () => {
if (radioAudio.paused) {
showSpinner();
radioAudio.src = " ";
radioAudio.load();
radioAudio.play().then(() => {
isPlaying = true;
}).catch(e => {
console.error("Oynatma hatası:", e);
alert("Radyo yayınına bağlanırken bir hata oluştu.");
hideSpinner();
});
} else {
radioAudio.pause();
}
hideSpinner();
};

stopBtn.onclick = () => {
radioAudio.pause();
radioAudio.currentTime = 0;
hideSpinner();
radioAudio.load();
};

fastForwardBtn.onclick = () => {
alert("Radyo canlı yayını ileri sarılamaz.");
};

rewindBtn.onclick = () => {
alert("Radyo canlı yayını geri sarılamaz.");
};

volumeSlider.addEventListener('input', () => {
radioAudio.volume = volumeSlider.value;
});

radioAudio.onplay = () => {
hideSpinner();
setupAudioContext();
if (audioContext.state === 'suspended') audioContext.resume();
animateEqualizer();
cdIcon.classList.add('playing');
isPlaying = true;
};

radioAudio.onpause = () => {
hideSpinner();
cdIcon.classList.remove('playing');
isPlaying = false;
};

radioAudio.addEventListener('error', () => {
console.error("Yayın hatası, yeniden bağlanmaya çalışılıyor...");
hideSpinner();
playPauseBtn.textContent = "❌";
setTimeout(() => {
radioAudio.load();
radioAudio.play();
}, 5000);
});

radioAudio.onwaiting = () => {
showSpinner();
};

radioAudio.oncanplay = () => {
hideSpinner();
};

function updateStreamInfo() {
const streamInfoElement = document.querySelector('.cc_streaminfo');
const marqueeSpan = document.querySelector('#stream-info');
if (streamInfoElement && marqueeSpan) {
const infoText = streamInfoElement.innerText.trim();
if (infoText && infoText !== 'Yükleniyor...') {
if (marqueeSpan.innerText !== infoText) {
marqueeSpan.innerText = infoText;
marqueeSpan.classList.remove('playing');
void marqueeSpan.offsetWidth;
if(isPlaying) {
marqueeSpan.classList.add('playing');
}
}
}
}
}
setInterval(updateStreamInfo, 1000);

volumeSlider.value = radioAudio.volume;
</script>

</body>
</html>
 

Ekli dosyalar

  • Flatcast Biz.txt
    14.1 KB · INDIRME: 1
Son düzenleme:
Cok Faydalı bir paylasım sağolasın
 
Üst Alt