hls.js

Design principle

design idea is pretty simple :

Code structure

Error detection and Handling