Muzibu Audio Format Sistemi

Bunny CDN Hybrid + Cihaz Bazlı Akıllı Format

Bunny CDN: Aktif Token Auth: Aktif

Format Dağılımı

🖥️

PC

HLS

Şifreli + ABR

32k → orijinal kalite

📱

Mobil Good

MP3 128k

Yüksek kalite

4GB+ RAM, 4G+

📵

Mobil Weak

MP3 64k

Düşük bant

Eski cihaz / yavaş net

Bunny CDN Hybrid Modu

HLS Serving (PC)

master.m3u8 www.muzibu.com (LOCAL)
playlist.m3u8 www.muzibu.com (LOCAL)
segment-XXX.ts audio.muzibu.com (BUNNY)
enc.bin (key) www.muzibu.com (LOCAL)

MP3 Serving (Mobil)

mp3_128/12345.mp3 audio.muzibu.com (BUNNY)
mp3_64/12345.mp3 audio.muzibu.com (BUNNY)
Token ?token=xxx&expires=123

Format Karar Zinciri (5 Seviye)

1 MUZIBU_AUDIO_FORCE (Kill Switch) boş → atla
2 _mz Query Param (Debug) yok → atla
3 User audio_preference 'auto' → atla
4 MUZIBU_DEFAULT_AUDIO_FORMAT 'auto' → atla
5 Cihaz Tespiti (AKTİF)
PC→hls Good→mp3_128 Weak→mp3_64

Mobil Cihaz Tespiti (mz_device Cookie)

Frontend JavaScript cihaz özelliklerini ölçer ve cookie'ye yazar.

🧠
RAM
≥ 4GB = +1 puan
CPU
≥ 4 çekirdek = +1 puan
📶
Bağlantı
4G/WiFi = +1 puan
✓ GOOD (≥2 puan)
Sonuç: MP3 128k
✗ WEAK (<2 puan veya cookie yok)
Sonuç: MP3 64k

ABA Test Promptları

🖥️ TEST 1: PC - HLS Kontrolü

🎯 GÖREV: PC'de HLS + Bunny CDN Segment Testi

ÖN HAZIRLIK:
- Tarayıcı cache temizle (Ctrl+Shift+Delete)
- DevTools → Network sekmesini aç

ADIMLAR:
1. https://www.muzibu.com adresine git (PC tarayıcı)
2. Giriş yap
3. Network'te filtre: ".ts OR .m3u8"
4. Bir şarkı çal, 20 saniye bekle

KONTROL:
□ master.m3u8 → www.muzibu.com (LOCAL)
□ segment-XXX.ts → audio.muzibu.com (BUNNY CDN)
□ Segment URL'de ?token= ve &expires= var mı?

RAPOR:
- Örnek segment URL kopyala
- Tüm segmentler audio.muzibu.com'dan mı geliyor?
- 401/403 hatası var mı?

📱 TEST 2: Mobil Good - MP3 128k Kontrolü

🎯 GÖREV: İyi Mobil Cihazda MP3 128k Testi

ÖN HAZIRLIK:
- iPhone/iPad veya iyi Android cihaz kullan
- Veya DevTools → Toggle Device → iPhone 14 Pro seç
- Cookie ayarla: mz_device=good (DevTools → Application → Cookies)

ADIMLAR:
1. Sayfayı yenile
2. Şarkı çal
3. Network'te filtre: "stream OR .mp3"

KONTROL:
□ /api/muzibu/songs/{id}/stream response'unda:
  - resolved_format: "mp3_128" olmalı
□ MP3 URL: audio.muzibu.com/songs/mp3_128/... olmalı
□ URL'de ?token= ve &expires= var mı?

RAPOR:
- resolved_format değeri ne?
- MP3 URL örneği kopyala

📵 TEST 3: Mobil Weak - MP3 64k Kontrolü

🎯 GÖREV: Zayıf Mobil Cihazda MP3 64k Testi

ÖN HAZIRLIK:
- DevTools → Toggle Device → Eski bir cihaz seç
- Cookie sil veya ayarla: mz_device=weak
- Veya cookie'yi tamamen sil (varsayılan weak)

ADIMLAR:
1. Sayfayı yenile
2. Şarkı çal
3. Network'te filtre: "stream OR .mp3"

KONTROL:
□ /api/muzibu/songs/{id}/stream response'unda:
  - resolved_format: "mp3_64" olmalı
□ MP3 URL: audio.muzibu.com/songs/mp3_64/... olmalı

RAPOR:
- resolved_format değeri ne?
- MP3 kalitesi 64k mı?

Sistem Akış Şeması


                         ┌──────────────┐
                         │  Play Butonu │
                         └──────┬───────┘
                                │
                         ┌──────▼───────┐
                         │ Cihaz Tespit │
                         └──────┬───────┘
                                │
          ┌─────────────────────┼─────────────────────┐
          │                     │                     │
          ▼                     ▼                     ▼
     ┌─────────┐          ┌──────────┐          ┌──────────┐
     │   PC    │          │  Mobil   │          │  Mobil   │
     │         │          │   Good   │          │   Weak   │
     └────┬────┘          └────┬─────┘          └────┬─────┘
          │                    │                     │
          ▼                    ▼                     ▼
     ┌─────────┐          ┌──────────┐          ┌──────────┐
     │   HLS   │          │   MP3    │          │   MP3    │
     │ Şifreli │          │  128k    │          │   64k    │
     │   ABR   │          │          │          │          │
     └────┬────┘          └────┬─────┘          └────┬─────┘
          │                    │                     │
          │    ┌───────────────┴─────────────────┐   │
          │    │                                 │   │
          ▼    ▼                                 ▼   ▼
     ┌─────────────────────────────────────────────────┐
     │              BUNNY CDN (audio.muzibu.com)       │
     │         Token Authentication + Cache            │
     └─────────────────────┬───────────────────────────┘
                           │
                    ┌──────▼──────┐
                    │ 🎵 Çalıyor! │
                    └─────────────┘
            

Mevcut Konfigürasyon

Bunny Storage

MODE: hybrid
TOKEN_KEY: VAR ✓
CDN_URL: audio.muzibu.com

Audio Format

DEFAULT: auto
FORCE: boş
Cihaz Tespiti: AKTİF ✓