mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
Add a dedicated hls field and a destroyPlayer() helper to ensure Hls instances are properly destroyed when the component is torn down or re-initialized. Replace inline Hls creation with a guarded pattern that destroys any existing hls before creating a new one, preventing leaks or duplicate attachments. Use destroyPlayer() from ngOnDestroy and when the channel input changes to centralize teardown logic and keep lifecycle handling consistent.