From a82f29eca502450d06b32c9b0d8a037c741dc4c6 Mon Sep 17 00:00:00 2001 From: Sithira Munasinghe Date: Tue, 15 Oct 2024 07:42:43 +0530 Subject: [PATCH] Fixed #103. Added missing method Re ordered changelog --- CHANGELOG.md | 90 ++++++++++---------- lib/flutter_radio_player.dart | 4 + lib/flutter_radio_player_method_channel.dart | 2 +- 3 files changed, 52 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a076b7..c7315e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,76 +1,80 @@ -## 0.0.1 +# 3.0.1 -* Initial Release release of FlutterRadioPlayer +* Added missing method `jumpToSourceIndex(index)` -# 1.0.0 +# 3.0.0 -* Updated Read me. +* Completely Rewritten from scratch with backward compatibility in-mind +* Now supports album arts in both iOS and Android platforms +* Better support for platform native companion playbacks like watchOS, wearOS, CarPlay, and Android Auto +* Multiple bugfixes and enhancements from previous versions -# 1.0.1 +# 2.0.3 -* Fixed pubpec +* Bugfixes for Android 14+ -# 1.0.2 +# 2.0.2 -* Fixed pubpec +* Fixed compiling error. -# 1.0.3 +# 2.0.1 -* Fixed pubpec +* Updated for better rating -# 1.0.4 +# 2.0.0 -Fixed bugs and slightly improved documentation. +* Completely Rewritten from scratch with backward compatibility in-mind +* Supports multiple media-sources +* Better Events / Reactivity +* Better watchOS / WearOS support +* Better native control support +* New methods to control the player better -* Fixed an issue where player failed to bind to the application context. -* Fixed an issue with EventSink. -* Fixed a typo in the pubspec +# 1.1.0 -# 1.0.5 +* Updated to NULL-SAFETY +* Updated exo-player version +* Bug fixes and improvements -Fixed bugs, reorganized code and improved documentation. +# 1.0.7 -* Added setUrl method to dynamically change the playing URL. -* Improved documentation. +* Fixed media meta-data on iOS # 1.0.6 * Fixed media meta-data bug and dynamic URL changing issue. -# 1.0.7 +# 1.0.5 -* Fixed media meta-data on iOS +Fixed bugs, reorganized code and improved documentation. -# 1.1.0 +* Added setUrl method to dynamically change the playing URL. +* Improved documentation. -* Updated to NULL-SAFETY -* Updated exo-player version -* Bug fixes and improvments +# 1.0.4 -# 2.0.0 +Fixed bugs and slightly improved documentation. -* Completely Rewritten from scratch with backward compatibility in-mind -* Supports multiple media-sources -* Better Events / Reactivity -* Better watchOS / WearOS support -* Better native control support -* New methods to control the player better +* Fixed an issue where player failed to bind to the application context. +* Fixed an issue with EventSink. +* Fixed a typo in the pubspec -# 2.0.1 +# 1.0.3 -* Updated for better rating +* Fixed pubpec -# 2.0.2 +# 1.0.2 -* Fixed compiling error. +* Fixed pubpec -# 2.0.3 +# 1.0.1 -* Bugfixes for Android 14+ +* Fixed pubpec -# 3.0.0 +# 1.0.0 -* Completely Rewritten from scratch with backward compatibility in-mind -* Now supports album arts in both iOS and Android platforms -* Better support for platform native companion playbacks like watchOS, wearOS, CarPlay and Android Auto -* Multiple bugfixes and enhancements from previous versions \ No newline at end of file +* Updated Read me. + +# 0.0.1 + +* Initial Release of FlutterRadioPlayer \ No newline at end of file diff --git a/lib/flutter_radio_player.dart b/lib/flutter_radio_player.dart index 81ddb59..34b285e 100644 --- a/lib/flutter_radio_player.dart +++ b/lib/flutter_radio_player.dart @@ -31,6 +31,10 @@ class FlutterRadioPlayer { return FlutterRadioPlayerPlatform.instance.previousSource(); } + Future jumpToSourceIndex(int index) { + return FlutterRadioPlayerPlatform.instance.jumpToSourceIndex(index); + } + Stream getPlaybackStream() => FlutterRadioPlayerPlatform.instance.getIsPlayingStream(); diff --git a/lib/flutter_radio_player_method_channel.dart b/lib/flutter_radio_player_method_channel.dart index e32ca52..6f3f85b 100644 --- a/lib/flutter_radio_player_method_channel.dart +++ b/lib/flutter_radio_player_method_channel.dart @@ -72,7 +72,7 @@ class MethodChannelFlutterRadioPlayer extends FlutterRadioPlayerPlatform { @override Future jumpToSourceIndex(int index) async { - await methodChannel.invokeMethod("jumpToItem", {"index": index}); + await methodChannel.invokeMethod("sourceAtIndex", {"index": index}); } @override