diff --git a/README.md b/README.md index 898977f..fec3a90 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Initialisation: ```dart final player = AudioPlayer(); var duration = await player.setUrl('https://foo.com/bar.mp3'); +var duration = await player.setFilePath('/path/to/file.mp3'); +var duration = await player.setAsset('path/to/asset.mp3'); ``` Standard controls: diff --git a/lib/just_audio.dart b/lib/just_audio.dart index 497709c..1331fe9 100644 --- a/lib/just_audio.dart +++ b/lib/just_audio.dart @@ -1123,7 +1123,7 @@ abstract class UriAudioSource extends IndexedAudioSource { }; } -/// An [AudioSource] representing a regular media file such asn an MP3 or M4A +/// An [AudioSource] representing a regular media file such as an MP3 or M4A /// file. The following URI schemes are supported: /// /// * file: loads from a local file (provided you give your app permission to @@ -1138,7 +1138,13 @@ class ProgressiveAudioSource extends UriAudioSource { : super(uri, headers: headers, tag: tag, type: 'progressive'); } -/// An [AudioSource] representing a DASH stream. +/// An [AudioSource] representing a DASH stream. The following URI schemes are +/// supported: +/// +/// * file: loads from a local file (provided you give your app permission to +/// access that file). +/// * asset: loads from a Flutter asset (not supported on Web). +/// * http(s): loads from an HTTP(S) resource. /// /// On platforms except for the web, the supplied [headers] will be passed with /// the HTTP(S) request. Currently headers are not recursively applied to items @@ -1148,7 +1154,13 @@ class DashAudioSource extends UriAudioSource { : super(uri, headers: headers, tag: tag, type: 'dash'); } -/// An [AudioSource] representing an HLS stream. +/// An [AudioSource] representing an HLS stream. The following URI schemes are +/// supported: +/// +/// * file: loads from a local file (provided you give your app permission to +/// access that file). +/// * asset: loads from a Flutter asset (not supported on Web). +/// * http(s): loads from an HTTP(S) resource. /// /// On platforms except for the web, the supplied [headers] will be passed with /// the HTTP(S) request. Currently headers are not applied recursively.