I am broadcasting live on my site and I am doing these live broadcasts through the m3u8 file. I'm pulling the m3u8 file on the remote server with the code block I've sent below and giving the link to my video player.
Then, to hide the link on the remote server, you can use the outgoing links on your own.
When I do this I get a working build with 100% certainty. When the number of users logging into my website is 50+, my cpu usage increases too much.
I tried to redirect the requests from the original url instead of my own site, but again my cpu consumption was too high.
File creation and reading work when the player is started. The query determines which link will work. /For example: live?channel=abcTv This link is sent to the player and the incoming channel query receives the link of that channel and starts processing
request(m3u8Url, async function (error, response, body) {
if (!error && response.statusCode == 200) {
await fs.writeFileSync(`public/Uploads/Live/channel1.m3u8`,body);
await fs.createReadStream(`public/Uploads/Live/channel1.m3u8`).pipe(res);}});
Then, to hide the link on the remote server, you can use the outgoing links on your own.
var newurl = `${parseURL.protocol}//${parseURL.host}` + setNewURL;
request(newurl).pipe(res)
When I do this I get a working build with 100% certainty. When the number of users logging into my website is 50+, my cpu usage increases too much.
I tried to redirect the requests from the original url instead of my own site, but again my cpu consumption was too high.
File creation and reading work when the player is started. The query determines which link will work. /For example: live?channel=abcTv This link is sent to the player and the incoming channel query receives the link of that channel and starts processing