/cordova-plugin-ios-streaming-audio

Cordova plugin for streaming audio on iOS

Primary LanguageObjective-CApache License 2.0Apache-2.0

Cordova iOS Streaming Audio plugin

Forked from https://github.com/keosuofficial/cordova-audio-stream-plugin to tailor it for my needs.

As of today (December 2019), the popular Cordova Media plugin can not stream audio on iOS. The Cordova Streaming Media plugin can stream, but it always does it in the full-screen mode. This plugin is meant to do just one thing: playback streaming audio on iOS platform with no UI attached.

Installation

cordova plugin add https://github.com/kshabunov/cordova-plugin-ios-streaming-audio.git

Usage example

  // Create new instance
  function onStart() {
    console.log("Audio streaming started");
  }
  function onError(error) {
    console.log('Audio streaming error, code: ' + error.code + ', message: ' + error.message);
  }
  var audioStream = new AudioStream("http://your.audio/stream", onStart, onError);
  
  // Start streaming
  audioStream.play();

  // Stop streaming
  audioStream.stop();