Skip to content

Commit

Permalink
Merge branch 'fix/hls_nested_uri' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Mar 20, 2023
2 parents e7aedc8 + 932fdcc commit 097e04d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions just_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Fix ignored tag parameter in AudioSource.asset().
* Fix ignored tag parameter in AudioSource.file().
* Fix nested URIs in HLS from EXT-X-MEDIA when using headers.

## 0.9.31

Expand Down
2 changes: 1 addition & 1 deletion just_audio/example/lib/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class SeekBarState extends State<SeekBar> {
.firstMatch("$_remaining")
?.group(1) ??
'$_remaining',
style: Theme.of(context).textTheme.caption),
style: Theme.of(context).textTheme.bodySmall),
),
],
);
Expand Down
4 changes: 2 additions & 2 deletions just_audio/example/lib/example_playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class MyAppState extends State<MyApp> with WidgetsBindingObserver {
),
),
Text(metadata.album,
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.titleLarge),
Text(metadata.title),
],
);
Expand Down Expand Up @@ -235,7 +235,7 @@ class MyAppState extends State<MyApp> with WidgetsBindingObserver {
Expanded(
child: Text(
"Playlist",
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
textAlign: TextAlign.center,
),
),
Expand Down
2 changes: 1 addition & 1 deletion just_audio/example/lib/example_radio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MyAppState extends State<MyApp> with WidgetsBindingObserver {
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(title,
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.titleLarge),
),
],
);
Expand Down
2 changes: 2 additions & 0 deletions just_audio/lib/just_audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3197,6 +3197,8 @@ _ProxyHandler _proxyHandlerForUri(
// TODO: Handle other playlist formats similarly?
final m3u8 = await originResponse.transform(utf8.decoder).join();
for (var line in const LineSplitter().convert(m3u8)) {
line = line.replaceAllMapped(
RegExp(r'#EXT-X-MEDIA:.*?URI="(.*?)".*'), (m) => m[1]!);
line = line.replaceAll(RegExp(r'#.*$'), '').trim();
if (line.isEmpty) continue;
try {
Expand Down

0 comments on commit 097e04d

Please sign in to comment.