Architecture Constraint | Batasan Arsitektur
[EN] The streaming engine strictly requires AniList ID. Querying with MyAnimeList (MAL) or custom database IDs will result in HTTP 404 (Not Found).
[ID] Engine streaming secara ketat membutuhkan AniList ID. Melakukan query dengan MyAnimeList (MAL) atau ID database kustom akan menghasilkan HTTP 404.
Player Initialization | Inisialisasi
Deployment Specifications | Spesifikasi Implementasi
1. Endpoint Routing
[EN] Construct the URL based on the specified parameters. / [ID] Bentuk URL berdasarkan parameter yang ditentukan.
https://www.haimiya.my.id/api/{anilist_id}/{episode}/{type}
2. Iframe Wrapper (16:9)
[EN] Required HTML wrapper to maintain responsive cinematic aspect ratio. / [ID] Wrapper HTML wajib untuk menjaga rasio aspek responsif.
<!-- 16:9 Responsive Container --> <div style="position:relative; padding-bottom:56.25%; height:0; background:#000; border-radius:4px; overflow:hidden;"> <iframe src="https://www.haimiya.my.id/api/169580/3/sub" style="position:absolute; top:0; left:0; width:100%; height:100%; border:none;" scrolling="no" allowfullscreen> </iframe> </div>
3. Event Payload (PostMessage)
[EN] Event listener configuration to handle Auto-Next and Sync Tracking. / [ID] Konfigurasi event listener untuk menangani Auto-Next dan Tracking.
window.addEventListener("message", (e) => { try { const data = typeof e.data === 'string' ? JSON.parse(e.data) : e.data; // [ Complete Event ] Trigger next episode logic if (data.channel === "cihuystrim" && data.event === "complete") { console.log("STATE: Video Finished"); } // [ Time Event ] Real-time progress synchronization if (data.type === "watching-log") { let percent = (data.currentTime / data.duration) * 100; console.log(\`SYNC: \${percent.toFixed(2)}%\`); } } catch (err) { // Ignore unrelated messages } });