Loudspeaker Overview
Loudspeaker is a robust, reliable, and efficient audio playback library for iOS and macOS. It simplifies both local and remote audio file playback, offering seamless control over audio sessions and routes. It is designed to meet the needs of developers looking for a flexible audio platform that can handle a versatile range of applications.
Features
- Support for different audio formats.
- Handles audio interruptions.
- Remote control and headset plugin/plugout handling.
- Handles route changes.
- Supports streaming audio from the network.
- Automatic audio session management.
- Supports both iOS and macOS platforms.
Integration and Installation
The Loudspeaker can be integrated via CocoaPods, Carthage, or Swift Package Manager. Instructions for each method can be found below:
CocoaPods
Pod 'Loudspeaker'
Carthage
github "Loudspeaker/Loudspeaker"
Swift Package Manager
dependencies: [
.package(url: "https://github.com/Loudspeaker/Loudspeaker.git", .upToNextMajor(from: "1.0.0")
]
Getting Started
After successfully integrating the Loudspeaker into your project, import the module by adding the following statement:
import Loudspeaker
Usage
The library provides several high-level APIs that abstract the complexities of audio playback. They include:
Audio Session
Manages the audio session, handles interruptions, and handles route changes automatically.
Headset Events
Manages the headset plug-in/plug-out events seamlessly.
Audio Playbacks
Supports local and remote audio file playbacks.
License
Loudspeaker is released under the MIT License. See LICENSE for details.