url_audio_stream 1.0.0+3

  • Readme
  • Changelog
  • Example
  • Installing
  • 84

url_audio_stream #

Dart plugin to live stream audio URLs. The package will accept both HTTP and HTTPs URLs for streaming. Specifics will be discussed below for native designs, limitations, and implementations. Any help would be greatly appreciated if possible!

Usage #

Add the dependency


Import the package into your dart file

import 'package:url_audio_stream/url_audio_stream.dart';

Functions and usage

AudioStream stream = new AudioStream("https://your_url_goes_here.com");

Android #

The Android MediaPlayer was used for audio streaming over HTTP/HTTPS. Refer to the Android for information about the MediaPlayer. The player uses setAudioAttributes method for setting up the MediaPlayer for API levels over 26. Anything under that API level will use setAudioStreamType method, which was deprecated in API level 26. Due to this adaption, the flutter compiler will give a message that the plugin is using a deprecated method.

HTTP Streams #

Android requires an edit to your android manifest to allow connection to non-HTTP sources, follow this link to edit the manifest for clear text traffic.

iOS #

The Swift AVPlayer was used for the implementation over HTTP/HTTPS. Refer to the Apple site for information about the AVPlayer. The player was designed in Swift 5 and requires a change in the Info.plist if you need to HTTP stream. According to the Apple article, iOS SDK 4.0+ is required for streaming.

HTTP Streams #

For the clear text traffic, a change will need to be done in XCode on the Runner.xcworkspace file. The NSAppTransportSecurity flag will need to be changed. It is recommended that you add an exception to the site you are streaming, rather than allowing all HTTP traffic. You can follow this StackOverflow link for changing or adding domains for streaming.

url_audio_stream #

1.0.0+1 #

Android #

  • Added an ability to stream on all APIs that Flutter can run on

iOS #

  • iOS can stream in the background

1.0.0+2 #

  • Changed the homepage reference

1.0.0+3 #

  • API comments for iOS and Android
  • A detailed description was added to pubspec.yaml
  • Flutter formatting was applied to the url_audio_stream.dart file


url_audio_stream_example #

Demonstrates how to use the url_audio_stream plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  url_audio_stream: ^1.0.0+3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:url_audio_stream/url_audio_stream.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

7 out of 7 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies