Skip to content

Commit

Permalink
Add missing icyMetadata parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Apr 22, 2020
1 parent 4589089 commit 4a5c885
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 66 deletions.
72 changes: 15 additions & 57 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
Expand All @@ -36,34 +22,34 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
convert:
clock:
dependency: transitive
description:
name: convert
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
version: "1.0.1"
collection:
dependency: transitive
description:
name: crypto
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "1.14.12"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -79,20 +65,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
just_audio:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "0.1.5"
version: "0.1.6"
matcher:
dependency: transitive
description:
Expand All @@ -113,35 +92,21 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
version: "1.7.0"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
rxdart:
dependency: "direct main"
description:
Expand Down Expand Up @@ -210,13 +175,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.8 <2.0.0"
22 changes: 13 additions & 9 deletions lib/just_audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,17 @@ class AudioPlayer {
bufferedPosition: Duration(milliseconds: data[4]),
speed: _speed,
duration: _duration,
icyMetadata: data[5] == null ? null : IcyMetadata(
info: IcyInfo(title: data[5][0][0], url: data[5][0][1]),
headers: IcyHeaders(
bitrate: data[5][1][0],
genre: data[5][1][1],
name: data[5][1][2],
metadataInterval: data[5][1][3],
url: data[5][1][4],
isPublic: data[5][1][5])),
icyMetadata: data[5] == null
? null
: IcyMetadata(
info: IcyInfo(title: data[5][0][0], url: data[5][0][1]),
headers: IcyHeaders(
bitrate: data[5][1][0],
genre: data[5][1][1],
name: data[5][1][2],
metadataInterval: data[5][1][3],
url: data[5][1][4],
isPublic: data[5][1][5])),
));
_eventChannelStreamSubscription =
_eventChannelStream.listen(_playbackEventSubject.add);
Expand Down Expand Up @@ -443,6 +445,7 @@ class AudioPlaybackEvent {
Duration bufferedPosition,
double speed,
Duration duration,
IcyMetadata icyMetadata,
}) =>
AudioPlaybackEvent(
state: state ?? this.state,
Expand All @@ -452,6 +455,7 @@ class AudioPlaybackEvent {
bufferedPosition: bufferedPosition ?? this.bufferedPosition,
speed: speed ?? this.speed,
duration: duration ?? this.duration,
icyMetadata: icyMetadata ?? this.icyMetadata,
);

/// The current position of the player.
Expand Down

0 comments on commit 4a5c885

Please sign in to comment.