Watch YouTube Live Streams via a Cloudflare Worker
- AD free
- Fast
- Scalable
- Secure
- Serverless
- Can play on any media player, like VLC, which supports .m3u8
- Make a .m3u playlist and use it on your Smart TV/Kodi/Android device
- Go to https://workers.cloudflare.com/ and create a Cloudflare worker
- Copy the contents of the
worker.jsfile into the the newly-created worker script file - Save and deploy
Your worker route would be something like yourapp.example.workers.dev
To play a live stream you've to pass the YouTube channel id or the video id to the worker
For hls streams use master.m3u8 in the url path
For dash streams use master.m3u8 in the url path
For ex:
YouTube url : https://www.youtube.com/@Channel_Name
New worker url: https://yourapp.example.workers.dev/stream/@Channel_Name/index.m3u8
Tip: https://www.youtube.com/Channel_Name/live and https://www.youtube.com/watch?v=jjH6v95z3Nw are both acceptable urls, but the former is preferable as it is a permanent url.
https://youtube.bisdaktv.com/stream/@Channel_Name/index.m3u8
Play the above url in VLC media player or any player supporting hls or dash streams