You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made sure that the issue I am raising doesn't already exist
Use case / Problem
Audioplayers should be able to play sounds from a Dart/Flutter commandline/terminal application. Right now it can't because of dart:ui
Proposal / Solution
Provide a method for playing sounds from a commandline/terminal application.
Example Code
void main() async {
AudioPlayer audioPlayer = AudioPlayer();
// Direct URL of the Icecast stream
var url = "http://stream.rekt.network/datawave.ogg";
// Create a URL source for the audio player
var audioSource = UrlSource(url);
// Attempt to play the stream from the URL source
await audioPlayer.setSource(audioSource);
// Listen to player state changes
audioPlayer.onPlayerStateChanged.listen((state) {
if (state == PlayerState.playing) {
print("Stream is playing!");
} else if (state == PlayerState.stopped) {
print("Stream stopped.");
} else if (state == PlayerState.paused) {
print("Stream paused.");
} else if (state == PlayerState.completed) {
print("Stream completed.");
}
});
...
throws
.../flutter/packages/flutter/lib/src/foundation/binding.dart:9:8: Error: Dart library 'dart:ui' is not available on this platform.
Affected platforms
Linux, other
Platform details
No response
Audio Files/URLs/Sources
No response
Mockups
No response
Related issues / more information
No response
Working on PR
yeah
The text was updated successfully, but these errors were encountered:
Sounds interesting. Didn't think about outside the UI world, yet. Is this achievable through flutter embedding? Anyways we are happy with any contributions :D
Checklist
Use case / Problem
Audioplayers should be able to play sounds from a Dart/Flutter commandline/terminal application. Right now it can't because of dart:ui
Proposal / Solution
Provide a method for playing sounds from a commandline/terminal application.
Example Code
throws
Affected platforms
Linux, other
Platform details
No response
Audio Files/URLs/Sources
No response
Mockups
No response
Related issues / more information
No response
Working on PR
yeah
The text was updated successfully, but these errors were encountered: