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.js
file 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 url of the video to the worker
For ex:
YouTube url : https://www.youtube.com/channel/UCP0uG-mcMImgKnJz-VjJZmQ/live
New worker url: https://yourapp.example.workers.dev/?url=https://www.youtube.com/channel/UCP0uG-mcMImgKnJz-VjJZmQ/live
Tip: https://www.youtube.com/channel/UCP0uG-mcMImgKnJz-VjJZmQ/live
and https://www.youtube.com/watch?v=jjH6v95z3Nw
are both acceptable urls, but the former is preferable as it is a permanent url.
Play the above url in VLC media player