Document more iOS support, accessing HTTP URLS

This commit is contained in:
Ryan Heise 2020-04-05 18:30:26 +10:00
parent 7911f2010f
commit 5446a6f611
1 changed files with 28 additions and 2 deletions

View File

@ -7,8 +7,8 @@ A Flutter plugin to play audio from URLs, files, assets and DASH/HLS streams. Th
| Feature | Android | iOS | Web | | Feature | Android | iOS | Web |
| ------- | :-------: | :-----: | :-----: | | ------- | :-------: | :-----: | :-----: |
| read from URL | ✅ | ✅ | ✅ | | read from URL | ✅ | ✅ | ✅ |
| read from file | ✅ | (untested) | | | read from file | ✅ | | |
| read from asset | ✅ | (untested) | | | read from asset | ✅ | | |
| DASH | ✅ | (untested) | (untested) | | DASH | ✅ | (untested) | (untested) |
| HLS | ✅ | (untested) | (untested) | | HLS | ✅ | (untested) | (untested) |
| play/pause/stop/seek | ✅ | ✅ | ✅ | | play/pause/stop/seek | ✅ | ✅ | ✅ |
@ -51,6 +51,32 @@ Release resources:
await player.dispose(); await player.dispose();
``` ```
## Connecting to HTTP URLS
If you wish to connect to HTTP URLS, some additional platform-specific configuration is required.
### iOS
Add the following to your `Info.plist` file:
```xml
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
</dict>
```
### Android
Add the following attribute to the `application` element of your `AndroidManifest.xml` file:
```xml
<application ... android:usesCleartextTraffic="true">
```
## Todo ## Todo
* FLAC support * FLAC support