Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Allow users to pass a custom Opus library #185

Open
Hazmi35 opened this issue Aug 18, 2021 · 4 comments
Open

Allow users to pass a custom Opus library #185

Hazmi35 opened this issue Aug 18, 2021 · 4 comments

Comments

@Hazmi35
Copy link

Hazmi35 commented Aug 18, 2021

Is your feature request related to a problem? Please describe.
No.

Describe the ideal solution
Adding an option to choose explicitly what opus lib to be used

Describe alternatives you've considered
An option to use own custom opus library

Additional context
Allowing users to pass what opus lib to choose explicitly or allowing them to pass custom opus library

@kyranet
Copy link
Member

kyranet commented Aug 18, 2021

What's the use-case for this?

@Hazmi35
Copy link
Author

Hazmi35 commented Aug 19, 2021

Originally, I thought of "locking" @discordjs/voice to use a specific opus library, but this can be done by the user itself.
For example: Encode the audio to ogg/opus first then use inputType: "ogg/opus".

But an option to use a custom opus library or giving an option to the user to handle the opus library by itself is better,
I don't know yet what the other use-cases for this are except locking down to a specific opus library or using a custom opus library.

Or is this already possible using getNode(StreamType).addEdge from TransformerGraph? I'm not that familiar with the codebase here, but I'll try to understand it.

@amishshah
Copy link
Member

This would be a limitation of prism-media, as it just picks the Opus library that offers the best performance from those that are installed. I'm not really sure why you'd want to override this behaviour? If you want to lock your bot to use a specific Opus library, you can make that Opus library a dependency of your project.

@Hazmi35
Copy link
Author

Hazmi35 commented Sep 11, 2021

Yes, sorry. The original idea was locking down to a specific opus library, but I changed my mind. The new idea was a way for users to pass a custom opus library.

@Hazmi35 Hazmi35 changed the title Let users choose what opus library to be used Allow users to pass a custom Opus library Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants