Closed masus04 closed 1 year ago
Followup issue for https://github.com/bluefireteam/audioplayers/issues/1249
Ok thanks, it would be good to have at least a public API to test the UrlSource against. Otherwise it's almost impossible to help. Good luck.
I managed to reproduce the error here: https://github.com/masus04/flutter-audiplayers-error
Make sure to run both the frontend & backend. Commands are provided in the readme.
I tried your example and could not reproduce the bug. I used the test.mp3
in the root folder.
Maybe this is solved by #1268
Plz try again with this in your pubspec file:
dependency_overrides:
audioplayers:
git:
url: https://github.com/bluefireteam/audioplayers.git
path: 'packages/audioplayers'
audioplayers_platform_interface:
git:
url: https://github.com/bluefireteam/audioplayers.git
path: 'packages/audioplayers_platform_interface'
audioplayers_web:
git:
url: https://github.com/bluefireteam/audioplayers.git
path: 'packages/audioplayers_web'
audioplayers_linux:
git:
url: https://github.com/bluefireteam/audioplayers.git
path: 'packages/audioplayers_linux'
audioplayers_android:
git:
url: https://github.com/bluefireteam/audioplayers.git
path: 'packages/audioplayers_android'
You can now also use the newest release: audioplayers: ^1.1.0
@masus04 can you reconfirm with newer versions of AP?
Can confirm that the issue no longer persists with the latest versions.
Checklist
An error is thrown when pausing a currently playing audioplayer using a URLSource from a stream. This breaks the audioplayer and makes it impossible to resume playing any source after that.
Current bug behaviour
Starting an
audioplayer
using a streamURLSource
works as intended. When pausing theaudioplayer
usingaudioPlayer.pause()
and then resuming usingaudioPlayer.resume()
, the following error is thrown and theaudioplayer
becomes unresponsive to any further commands:Expected behaviour
The audio should be paused when calling
audioPlayer.pause()
and resume when callingaudioPlayer.resume()
.Steps to reproduce
audioplayer
audioplayer.play(URLSource(sourceUrl))
audioPlayer.pause()
audioPlayer.resume()
Code sample
I'm working on reproducing the error in a minimal example project, however it seems to be somewhat specific to certain technology choices I made, specifically on how the source is provided.Logs
The error being thrown:
Full Logs
Flutter doctor: ``` [✓] Flutter (Channel stable, 3.0.5, on Ubuntu 22.04.1 LTS 5.15.0-46-generic, locale en_US.UTF-8) • Flutter version 3.0.5 at /home/masus/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (7 weeks ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /home/masus/Android/Sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /snap/android-studio/123/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at google-chrome [✓] Linux toolchain - develop for Linux desktop • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) • cmake version 3.10.2 • ninja version 1.8.2 • pkg-config version 0.29.1 [✓] Android Studio (version 2021.2) • Android Studio at /snap/android-studio/123/android-studio • Flutter plugin version 69.0.2 • Dart plugin version 212.5744 • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) [✓] VS Code • VS Code at /snap/code/current • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.1 LTS 5.15.0-46-generic • Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.101 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```Audio Files/URLs/Sources
Environment information
Platform 1:
debug
& releaseMore information