From b6e4a01113b4dfd5736ee4778b2a6bf31febad38 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Thu, 30 Apr 2020 23:47:29 +1000 Subject: [PATCH] Documentation --- README.md | 6 +++--- lib/just_audio.dart | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ec6bd8..b747f33 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ A Flutter plugin to play audio from URLs, files, assets and DASH/HLS streams. Th | read from file | ✅ | ✅ | ✅ | | | read from asset | ✅ | ✅ | ✅ | | | DASH | ✅ | (untested) | (untested) | (untested) | -| HLS | ✅ | (untested) | (untested) | (untested) | +| HLS | ✅ | ✅ | (untested) | (untested) | | play/pause/stop/seek | ✅ | ✅ | ✅ | ✅ | | set volume | ✅ | (untested) | (untested) | (untested) | -| set speed | ✅ | (untested) | (untested) | ✅ | +| set speed | ✅ | ✅ | ✅ | ✅ | | clip audio | ✅ | | | ✅ | | dispose | ✅ | ✅ | ✅ | ✅ | -| catch player errors | ✅ | | | | +| catch player errors | ✅ | | | | This plugin has been tested on Android and Web, and is being made available for testing on iOS. Please consider reporting any bugs you encounter [here](https://github.com/ryanheise/just_audio/issues) or submitting pull requests [here](https://github.com/ryanheise/just_audio/pulls). diff --git a/lib/just_audio.dart b/lib/just_audio.dart index 87b625a..501d686 100644 --- a/lib/just_audio.dart +++ b/lib/just_audio.dart @@ -204,13 +204,21 @@ class AudioPlayer { /// The current speed of the player. double get speed => _speed; - /// Whether the player should automatically delay playback in order to minimize stalling. (iOS 10.0 or later only) + /// Whether the player should automatically delay playback in order to + /// minimize stalling. (iOS 10.0 or later only) bool get automaticallyWaitsToMinimizeStalling => _automaticallyWaitsToMinimizeStalling; /// Loads audio media from a URL and completes with the duration of that /// audio, or null if this call was interrupted by another call so [setUrl], /// [setFilePath] or [setAsset]. + /// + /// On Android, DASH and HLS streams are detected only when the URL's path + /// has an "mpd" or "m3u8" extension. If the URL does not have such an + /// extension and you have no control over the server, and you also know the + /// type of the stream in advance, you may as a workaround supply the + /// extension as a URL fragment. e.g. + /// https://somewhere.com/somestream?x=etc#.m3u8 Future setUrl(final String url) async { try { _durationFuture = _invokeMethod('setUrl', [url])