Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] Play raw Opus frames from websocket stream #24

Closed
Wyctus opened this issue Aug 4, 2020 · 6 comments
Closed

[HELP] Play raw Opus frames from websocket stream #24

Wyctus opened this issue Aug 4, 2020 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@Wyctus
Copy link

Wyctus commented Aug 4, 2020

Hey, thanks for the great library, I'm really pleased with it!
I would like to ask for help related to these questions:

I'm streaming from my server raw Opus frames, without OGG or CAF container. Since iOS uses CAF instead of the standard OGG container, I'm trying to play the raw frames, so maybe somehow both of them can play my stream. But if necessary I can encapsulate it in a container.
Is it possible to play raw Opus? Or somehow play CAF/Opus on Android maybe?

My app receives audio data periodically through the websocket. I would like to redirect this audio stream to the player so it can play it continously. Is it somehow possible?

Thank you very much in advance!

@Wyctus Wyctus added the help wanted Extra attention is needed label Aug 4, 2020
@bsutton
Copy link
Owner

bsutton commented Aug 6, 2020

The short answer is I don't know.
At this point I'm not looking to support additional codecs directly within the project.

The idea is that we will only support the codecs that android/ios support natively.
I've done some VERY preliminary work on a sister project 'sounds_codecs' which is intended to provide support for a additional codecs.

@Wyctus
Copy link
Author

Wyctus commented Aug 6, 2020 via email

@bsutton
Copy link
Owner

bsutton commented Aug 6, 2020 via email

@Wyctus
Copy link
Author

Wyctus commented Aug 6, 2020

Buffer support sounds great!
Could you please show me a basic example? I can't find it anywhere.

Thanks!

@bsutton
Copy link
Owner

bsutton commented Aug 8, 2020

Its covered in the doco for Track.

Uint8List buffer = ....
// Load a local audio file and get it as a buffer
Uint8List buffer = (await rootBundle.load('assets/samples/audio.mp3'))
.buffer
.asUint8List();

Track.fromBuffer(buffer)
QuickPlay.fromTrack(track, volume: 1.0);

@Wyctus
Copy link
Author

Wyctus commented Aug 8, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants