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
Future<void> _init() async {
// Inform the operating system of our app's audio attributes etc.
// We pick a reasonable default for an app that plays speech.
final session = await AudioSession.instance;
await session.configure(const AudioSessionConfiguration.speech());
// Listen to errors during playback.
_player.playbackEventStream.listen((event) {},
onError: (Object e, StackTrace stackTrace) {
print('A stream error occurred: $e');
});
// Try to load audio from a source and catch any errors.
try {
// AAC example: https://dl.espressif.com/dl/audio/ff-16b-2c-44100hz.aac
await _player.setAudioSource(AudioSource.uri(Uri.parse(
"https://dict.youdao.com/dictvoice?audio=good&type=1")));
} on PlayerException catch (e) {
print("Error loading audio source: $e");
}
}
Which API doesn't behave as documented, and how does it misbehave?
Replace
【https://s3.amazonaws.com/scifri-episodes/scifri20181123-episode.mp3】 in the demo with:
【https://dict.youdao.com/dictvoice?audio=good&type=1】
Running error on iOS device.
Minimal reproduction project
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Replace
【https://s3.amazonaws.com/scifri-episodes/scifri20181123-episode.mp3】 in the demo with:
【https://dict.youdao.com/dictvoice?audio=good&type=1】
Running error on iOS device.
Error messages
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: