It started as a Proof of Concept (POC) but quickly turned into a weekend project. Unfortunately, due to time constraints, it still has many missing features and bugs.
Recently, I moved from my apartment and no longer have a smart enough TV to watch my IPTV. I couldn't find a web app that suited my needs; most available options relied on backend services. As a backend engineer, I decided to challenge myself with a frontend-only solution. Initially, I thought I could parse the IPTV playlist and play it using the HTML5 video element. However, I soon realized that this isn't as straightforward in the real world, and I'm still puzzled by why the HTML5 video player lacks the capabilities of VLC player.
My playlist streams are in mpeg2-ts format, and it took some effort to make them compatible with the video player. Although there are still some mpeg2-ts streams that I cannot play, I didn't prioritize addressing this issue.
After successfully creating a POC for playing IPTV streams, I found it intriguing to share the stream with others through WebRTC. Admittedly, I knew little about "signaling," but with some research via docs and YouTube, I managed to make it work. It's a bit buggy, but it "kinda" works.
The code is a bit messy, but if I find time to tidy it up, I'll push it to GitHub. Perhaps someone can help fix the bugs :)
In the future, if time allows, I plan to address these issues and explore new features, such as streaming to multiple peers, sticky sessions, caching the playlist, and more.
Feel free to give it a try if you're an IPTV user. You may need to allow "insecure content" if your playlist includes HTTP links and is missing CORS headers, similar to mine. Apologies if it doesn't work :)
Best,
Thanks