{"id":20696467,"url":"https://github.com/sithira/flutterradioplayer","last_synced_at":"2025-04-12T18:44:58.989Z","repository":{"id":41310051,"uuid":"250348566","full_name":"Sithira/FlutterRadioPlayer","owner":"Sithira","description":"Flutter Radio Player, A Plugin to handle streaming audio without a hassle","archived":false,"fork":false,"pushed_at":"2024-11-08T03:33:27.000Z","size":12836,"stargazers_count":146,"open_issues_count":6,"forks_count":66,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-03T21:12:09.479Z","etag":null,"topics":["flutter","flutter-audio","flutter-audio-player","flutter-background","flutter-plugin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sithira.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-26T19:08:39.000Z","updated_at":"2025-03-13T20:46:06.000Z","dependencies_parsed_at":"2023-12-23T10:27:14.723Z","dependency_job_id":"452477eb-6357-4ee2-8d34-e18431f273f5","html_url":"https://github.com/Sithira/FlutterRadioPlayer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FFlutterRadioPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FFlutterRadioPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FFlutterRadioPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FFlutterRadioPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sithira","download_url":"https://codeload.github.com/Sithira/FlutterRadioPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617263,"owners_count":21134190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-audio","flutter-audio-player","flutter-background","flutter-plugin"],"created_at":"2024-11-17T00:14:05.758Z","updated_at":"2025-04-12T18:44:58.966Z","avatar_url":"https://github.com/Sithira.png","language":"Kotlin","readme":"![logo](flutter_radio_player_logo.png)\n\n# Flutter Radio Player\n\n![Pub Version](https://img.shields.io/pub/v/flutter_radio_player?style=plastic)\n![Pub Likes](https://img.shields.io/pub/likes/flutter_radio_player)\n![Pub Points](https://img.shields.io/pub/points/flutter_radio_player)\n![Pub Popularity](https://img.shields.io/pub/popularity/flutter_radio_player)\n\n**Flutter Radio Player** is the go-to plugin for playing a single streaming URL effortlessly. With support for background music playback right out of the box, it offers seamless integration with platform-native media controls. Whether it's lock screen media controls or deeper integrations like watchOS, CarPlay, WearOS, or Android Auto, Flutter Radio Player handles it all with no extra configuration needed.\n\n## Features\n\n- **Background Playback**: Plays audio in the background without any configuration.\n- **Watch Integration**: Seamlessly integrates with WatchOS and WearOS for native watch control.\n- **Automotive Systems**: Supports infotainment systems like Apple CarPlay and Android Auto.\n- **Reactive by Default**: Automatically reacts to stream changes.\n- **ICY/Metadata Extraction**: Extracts stream metadata if available.\n\n## Getting Started\n\n### 1. Install the Player\n\n```bash\nflutter pub add flutter_radio_player\n```\n\n### 2. Import the Library\n\n```dart\nimport 'package:flutter_radio_player/flutter_radio_player.dart';\n```\n\n### 3. Configure the Player\n\n```dart\nfinal _flutterRadioPlayerPlugin = FlutterRadioPlayer(); // Create an instance of the player\n_flutterRadioPlayerPlugin.initialize(\n  [\n    {\"url\": \"https://s2-webradio.antenne.de/chillout?icy=https\"},\n    {\n      \"title\": \"SunFM - Sri Lanka\",\n      \"artwork\": \"images/sample-cover.jpg\", // Image needs to be bundled with the app\n      \"url\": \"https://radio.lotustechnologieslk.net:2020/stream/sunfmgarden?icy=https\",\n    },\n    {\"url\": \"http://stream.riverradio.com:8000/wcvofm.aac\"}\n  ],\n  true, // Auto play on load\n);\n```\n\nOnce configured, your player is ready to stream music.\n\n### Manipulating the Player\n\nYou can control the player using the following methods:\n\n| Method                 | Action                                                     |\n|------------------------|------------------------------------------------------------|\n| `play()`               | Plays the audio from the current source                    |\n| `pause()`              | Pauses the audio                                           |\n| `playOrPause()`        | Toggles play/pause                                         |\n| `changeVolume()`       | Adjusts the volume                                         |\n| `getVolume()`          | Retrieves the current volume                               |\n| `nextSource()`         | Skips to the next source in the list (if available)        |\n| `previousSource()`     | Goes to the previous source                                |\n| `jumpToSourceIndex()`  | Jumps to a specific index in the sources list              |\n\n### Available Streams\n\nYou can also listen to various streams:\n\n| Stream                           | Returns                             | Description                                          |\n|-----------------------------------|-------------------------------------|------------------------------------------------------|\n| `getIsPlayingStream()`            | `Stream\u003cbool\u003e`                      | Emits playback status                                |\n| `getNowPlayingStream()`           | `Stream\u003cNowPlayingDataChanged\u003e`      | Emits metadata such as track name                    |\n| `getDeviceVolumeChangedStream()`  | `Stream\u003cdouble\u003e`                    | Emits device audio level updates                     |\n\n## Platform Configuration\n\n### iOS\n\nTo enable background playback, configure background capabilities in Xcode as shown below:\n\n![Xcode Configuration](enabling-xcode-bg-service.png)\n\n### Android\n\nFor Android, ensure the following permissions are added to your `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK\" /\u003e\n```\n\n\u003e These permissions are already included in the library.\n\n**Check out the [Flutter Radio Player Example](/example)** to see how to implement action methods and streams in your player.\n\n## Support the Plugin\n\nIf you find this plugin useful, show your support by:\n\n- Giving it a ⭐️ on [GitHub](https://github.com/Sithira/FlutterRadioPlayer)\n- Leaving a like on Pub\n- Showing some ♥️ and buying me a coffee via USDT-TR20 at this address: `TNuTkL1ZJGu2xntmtzHzSiH5YdVqUeAujr`\n\n**Enjoy the plugin!**  \nSithira ✌️","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsithira%2Fflutterradioplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsithira%2Fflutterradioplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsithira%2Fflutterradioplayer/lists"}