Discord.js: Caching audio stream for reuse?

Created on 26 Jan 2020  路  3Comments  路  Source: discordjs/discord.js

I i want to make a radio station bot how can i cache the audio stream so that its not downloading and encodeing it for each instance?

Lets pretend something like this:

let cachedAudioStream = cacheArbitraryInput('http://philae.shoutca.st:8950/live', {});

then for every instance outgoing:

connection1.playArbitraryInput(cachedAudioStream, { volume: 0.5 });
connection2.playArbitraryInput(cachedAudioStream, { volume: 0.8 });
connection3.playArbitraryInput(cachedAudioStream, { volume: 1 });

Can this be done?

StackOverflow:
https://stackoverflow.com/questions/59919510/discord-js-playing-audio-on-multiple-servers

enhancement

Most helpful comment

And if you already posted your question on StackOverflow less than an hour ago, why are you posting it here?

All 3 comments

If you need help with discord.js installation or usage, please go to the discord.js Discord server instead:
https://discord.gg/bRCvFy9
This issue tracker is only for bug reports and enhancement suggestions.
You likely won't receive any basic help here.

And if you already posted your question on StackOverflow less than an hour ago, why are you posting it here?

And if you already posted your question on StackOverflow less than an hour ago, why are you posting it here?

Why not?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tom-barnes picture tom-barnes  路  3Comments

ghost picture ghost  路  3Comments

iCrawl picture iCrawl  路  3Comments

Lombra picture Lombra  路  3Comments

Dmitry221060 picture Dmitry221060  路  3Comments