All Projects → Sithira → Flutterradioplayer

Sithira / Flutterradioplayer

Licence: bsd-3-clause
Flutter Radio Player, A Plugin to handle streaming audio without a hassle

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Flutterradioplayer

Table calendar
Highly customizable, feature-packed Flutter Calendar with gestures, animations and multiple formats
Stars: ✭ 897 (+1420.34%)
Mutual labels:  flutter-plugin
Flutter Unity View Widget
Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
Stars: ✭ 961 (+1528.81%)
Mutual labels:  flutter-plugin
Fluttermidicommand
A Flutter plugin to send and receive MIDI
Stars: ✭ 41 (-30.51%)
Mutual labels:  flutter-plugin
Drm wv fp player
Few of the resources from flutter plugin video_player
Stars: ✭ 19 (-67.8%)
Mutual labels:  flutter-plugin
Fluttertoast
Android Toast Plugin for Flutter
Stars: ✭ 957 (+1522.03%)
Mutual labels:  flutter-plugin
Flutter Contacts Plugin
Contact plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to read, create and update contacts from the address book.
Stars: ✭ 38 (-35.59%)
Mutual labels:  flutter-plugin
Multi image picker
Flutter plugin that allows you to display multi image picker on iOS and Android. 👌🔝🎉
Stars: ✭ 889 (+1406.78%)
Mutual labels:  flutter-plugin
Dlna Dart
A simple DLNA DMC library implemented by Dart.
Stars: ✭ 46 (-22.03%)
Mutual labels:  flutter-plugin
Flutter Woocommerce Api
WooCommerce API in Flutter, connect and start developing with the available endpoints like get products, create orders and more.
Stars: ✭ 31 (-47.46%)
Mutual labels:  flutter-plugin
Flutter wechat ble
ble 4.0 with wechat style api for flutter. flutter版微信api风格的低功耗蓝牙
Stars: ✭ 41 (-30.51%)
Mutual labels:  flutter-plugin
Media picker
A Flutter Plugin for Selecting and Taking New Photos and Videos.
Stars: ✭ 24 (-59.32%)
Mutual labels:  flutter-plugin
Awesome Flutter
An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.
Stars: ✭ 38,582 (+65293.22%)
Mutual labels:  flutter-plugin
Flutter orientation
A Flutter plugin for device's orientation
Stars: ✭ 39 (-33.9%)
Mutual labels:  flutter-plugin
Flutter foreground service plugin
Stars: ✭ 19 (-67.8%)
Mutual labels:  flutter-plugin
Flutter branch sdk
Flutter Plugin for create deep link using Brach Metrics SDK. This plugin provides a cross-platform (iOS, Android).
Stars: ✭ 43 (-27.12%)
Mutual labels:  flutter-plugin
Fludex
Flutter + Redux = Fludex
Stars: ✭ 17 (-71.19%)
Mutual labels:  flutter-plugin
Leancloud flutter plugin
LeanCloud flutter plugin by Luna Gao
Stars: ✭ 34 (-42.37%)
Mutual labels:  flutter-plugin
Math Metrix
This is Math-Puzzle game made in flutter and available on Playstore & AppStore
Stars: ✭ 48 (-18.64%)
Mutual labels:  flutter-plugin
Firebase auth ui
Flutter plugin for Firebase Auth UI. Supports popular auth providers by using native SDK for Android and iOS.
Stars: ✭ 44 (-25.42%)
Mutual labels:  flutter-plugin
Localize and translate
Flutter localization in easy steps, really simple
Stars: ✭ 40 (-32.2%)
Mutual labels:  flutter-plugin

logo

likes popularity pub points

Flutter radio plugin handles a single streaming media preciously. This plugin was developed with maximum usage in mind. Flutter Radio player enables Streaming audio content on both Android and iOS natively, as an added feature this plugin supports background music play as well. This plugin also integrate deeply with both core media capabilities such as MediaSession on Android and RemoteControl capabilities (Control Center) on iOS. This plugin also support controlling the player via both wearOS and WatchOS.

Features

  • Supports both android and ios
  • Supports background music playing
  • Integrates well with watchOS and WearOS.
  • Handles network interruptions.
  • Reactive
  • Developer friendly (Logs are placed though out the codebase, so it's easy to trace a bug)

Reactivity ?

Unlike any other Music Playing plugin Flutter Radio Player is very reactive. It communicates with the native layer using Event and Streams, this making the plugin very reactive to both Application (Flutter) side and the native side.

Plugin events

This plugin utilises Android LocalBroadcaster and iOS Notification center for pushing out events. Names of the events are listed below.

  • flutter_radio_playing
  • flutter_radio_paused
  • flutter_radio_stopped
  • flutter_radio_error
  • flutter_radio_loading

Getting Started

  1. Add this to your package's pubspec.yaml file
dependencies:
  flutter_radio_player: ^1.X.X
  1. Install it
$ flutter pub get
  1. Import it
import 'package:flutter_radio_player/flutter_radio_player.dart';
  1. Configure it Creat a new instance of the player. An FlutterRadioPlayer instance can play a single audio stream at a time. To create it, simply call the constructor. However DO NOT make multiple instances of the service as FRP is using a FOREGROUND SERVICE to keep itself live when you minimize the application in Android.
FlutterRadioPlayer _flutterRadioPlayer = new FlutterRadioPlayer();

When you have an FRP instance you may simply call the init method to invoke the platform specific player preparation. For the API please reffer FRP API.

await _flutterRadioPlayer.init("Flutter Radio Example", "Live", "URL_HERE", "true");

After player preparation you may simply call playOrPause method to toggle audio stream.

await _flutterRadioPlayer.playOrPause();

FRP does allow you to change the URL after player initialized. You can simply change the stream url by calling setUrl on FRP object.

await _flutterRadioPlayer.setUrl('URL_HERE', "false");

calling above method will cause the existing URL to pause and play the newly set URL. Please refer the FRP API for api documentation.

Besides above mentioned method, below are the methods that FRP exposes.

  • stop() - Will stop all the streaming audio streams and detaches itself from FOREGROUND SERVICE. You need to reinitialize to use the plugin again,
await _flutterRadioPlayer.stop()
  • start() - Will start the audio stream using the initialized object.
await _flutterRadioPlayer.start()
  • pause() - Will pause the audio stream using the initialized object.
await _flutterRadioPlayer.pause()

Now that's not all. This plugin handles almost everything for you when it comes to playing a single stream of audio. From Player meta details to network interruptions, FRP handles it all with a sweat. Please refer the example to get an idea about what FRP can do.

iOS and Android Support

If the plugin is failing to initiate, kindly make sure your permission for background processes are given for your application

For your Android application you might want to add permissions in AndroidManifest.xml. This is already added for in the library level.

    <!--  Permissions for the plugin  -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <!--  Services for the plugin  -->
    <application android:usesCleartextTraffic="true">
        <service android:name=".core.StreamingCore"/>
    </application>

For your iOS application you need to enable it like this

xcode image

Support

Please hit a like to plugin on pub if you used it and love it. put a ⭐️ my GitHub repo and show me some ♥️ so i can keep working on this.

Found a bug ?

Please feel free to throw in a pull request. Any support is warmly welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].