Skip to content

Commit

Permalink
Add section to Troubleshooting about unavailable URLs (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanpotter committed Apr 11, 2021
1 parent 3830324 commit 9969f15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions troubleshooting.md
Expand Up @@ -3,9 +3,13 @@ This file describes some common pitfalls and how to solve them. Please always re
## Both platforms

### Asset not available/not found when playing local files

Flutter requires that files are specified on your pubspec.yaml file, under flutter > assets, check [this](https://github.com/luanpotter/bgug/blob/master/pubspec.yaml#L89) for an example. Also keep in mind that `AudioCache` class will look for files under the `assets` folder and this class must be used to play local files.


### Error when playing remote URL

The remote URL must be accessible and not be a redirect. If it's not an audio file, it does a redirect, it requires some headers, cookies or authentication, it will not work. Please bundle the file on the app or host it somewhere that properly provides the file. If you are having issues with playing audio from an URL, please first download the file and try running it locally. If the issue persists, then open the issue, including the file so we can test. Otherwise, it's an issue with your URL, not audioplayers.

### How to pause/stop audio?

The basic class of this package is the AudioPlayer class, which represents a single player playing a single audio, and it has methods `pause` and `stop` and `resume` to be used as you wish.
Expand Down

0 comments on commit 9969f15

Please sign in to comment.