Skip to content
Advertisement

HLS/m3u8 stream checker for a LIVE badge/image

Hey everybody how are you doing.

I have a small but for me a headache question. In short. I want to show a ”LIVE” badge/image if a HLS/m3u8 stream is active.

If somebody know’s how to achieve this, i would really appreciate it. Tried to google it but im clueless when it comes to implementing ”custom” code. It’s for a wordpress website.

i tried to work with this snippet but unfortunately it is not working for me.

JavaScript

Kind regards. (First time of me posting here. if i did something wrong let me know!)

Advertisement

Answer

Asked Def Forge if a status-200 checker would be sufficient and aparantly thats enough. I reccommended Axios but i think just “fetch” would be enough.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement