mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
Root causes fixed: 1. Remove starvation check that suspends AudioContext — it freezes the video clock and causes playback to stall permanently 2. Add backpressure (1s BUFFER_AHEAD) to prevent audio pump from decoding unbounded buffers, starving the video decoder 3. Add setTimeout(0) yield between batches so video rAF callbacks can run 4. Batch audio buffer reads (16 per iteration) to reduce IPC overhead 5. Fix latestScheduledEndTime time-domain: use media-time (same domain as currentTime) instead of AudioContext-time, so backpressure check works correctly after seeking Without these fixes, playing a large file (9+ GB) with audio causes: - Audio pump decodes hundreds of buffers in 1 second (195s of audio decoded in 1s wall clock) - Main thread blocked by 177 IPC calls/sec from audio iterator - Video frames never render (rAF starved) - After seek: backpressure never triggers due to time-domain mismatch, causing persistent stutter and eventual silence
artplayer-proxy-mediabunny
mediabunny proxy for ArtPlayer, including m3u8 playback through Mediabunny's HLS input support.
Demo
License
MIT © Harvey Zhao