Fix detection of DASH .mpd extension. Update support in README.
This commit is contained in:
parent
122a90b4fb
commit
6c869b01ab
|
@ -10,8 +10,8 @@ A Flutter plugin to play audio from URLs, files, assets, DASH/HLS streams and pl
|
|||
| read from file | ✅ | ✅ | ✅ | |
|
||||
| read from asset | ✅ | ✅ | ✅ | |
|
||||
| request headers | ✅ | ✅ | ✅ | |
|
||||
| DASH | ✅ | (untested) | (untested) | (untested) |
|
||||
| HLS | ✅ | ✅ | (untested) | (untested) |
|
||||
| DASH | ✅ | | | |
|
||||
| HLS | ✅ | ✅ | ✅ | |
|
||||
| buffer status/position | ✅ | ✅ | ✅ | ✅ |
|
||||
| play/pause/seek | ✅ | ✅ | ✅ | ✅ |
|
||||
| set volume | ✅ | ✅ | ✅ | ✅ |
|
||||
|
|
|
@ -896,7 +896,7 @@ abstract class AudioSource {
|
|||
bool hasExtension(Uri uri, String extension) =>
|
||||
uri.path.toLowerCase().endsWith('.$extension') ||
|
||||
uri.fragment.toLowerCase().endsWith('.$extension');
|
||||
if (hasExtension(uri, 'mdp')) {
|
||||
if (hasExtension(uri, 'mpd')) {
|
||||
return DashAudioSource(uri, headers: headers, tag: tag);
|
||||
} else if (hasExtension(uri, 'm3u8')) {
|
||||
return HlsAudioSource(uri, headers: headers, tag: tag);
|
||||
|
|
Loading…
Reference in New Issue