All Projects → delannoyk → Audioplayer

delannoyk / Audioplayer

Licence: mit
AudioPlayer is syntax and feature sugar over AVPlayer. It plays your audio files (local & remote).

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Audioplayer

Swiftaudio
Audio player for iOS
Stars: ✭ 160 (-73.94%)
Mutual labels:  audio, avplayer
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-87.13%)
Mutual labels:  audio, avplayer
Swift Radio Pro
Professional Radio Station App for iOS!
Stars: ✭ 2,644 (+330.62%)
Mutual labels:  audio, avplayer
Sbplayer ios
基于AVPlayer封装的轻量级播放器,可播放本地及网络视频,易于定制
Stars: ✭ 134 (-78.18%)
Mutual labels:  audio, avplayer
Modernavplayer
ModernAVPlayer is a persistence AVPlayer wrapper
Stars: ✭ 179 (-70.85%)
Mutual labels:  audio, avplayer
Fradioplayer
A simple radio player framework for iOS, macOS, tvOS.
Stars: ✭ 183 (-70.2%)
Mutual labels:  audio, avplayer
Fwplayer
A video player SDK for iOS, it is based on AVPlayer. https://se.linkedin.com/in/foks-huiwang, https://fokswang.wixsite.com/home
Stars: ✭ 321 (-47.72%)
Mutual labels:  audio, avplayer
Mixedreality Webrtc
MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
Stars: ✭ 568 (-7.49%)
Mutual labels:  audio
Tracktion engine
Tracktion Engine module
Stars: ✭ 587 (-4.4%)
Mutual labels:  audio
Axiom
An FFmpeg GUI for Windows
Stars: ✭ 560 (-8.79%)
Mutual labels:  audio
Chromaprint
C library for generating audio fingerprints used by AcoustID
Stars: ✭ 553 (-9.93%)
Mutual labels:  audio
Bluez Alsa
Bluetooth Audio ALSA Backend
Stars: ✭ 568 (-7.49%)
Mutual labels:  audio
Flac
Free Lossless Audio Codec
Stars: ✭ 593 (-3.42%)
Mutual labels:  audio
Hysteriaplayer
Objective-C audio player, sitting on top of AVPlayer
Stars: ✭ 568 (-7.49%)
Mutual labels:  audio
Beethoven
🎸 A maestro of pitch detection.
Stars: ✭ 601 (-2.12%)
Mutual labels:  audio
Soundfingerprinting
Open source audio fingerprinting in .NET. An efficient algorithm for acoustic fingerprinting written purely in C#.
Stars: ✭ 554 (-9.77%)
Mutual labels:  audio
Trinity
android video record editor muxer sdk
Stars: ✭ 609 (-0.81%)
Mutual labels:  audio
Webaudiofont
Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
Stars: ✭ 600 (-2.28%)
Mutual labels:  audio
Jsqsystemsoundplayer
A fancy Obj-C wrapper for Cocoa System Sound Services
Stars: ✭ 581 (-5.37%)
Mutual labels:  audio
Audio Visualizer Android
🎵 [Android Library] A light-weight and easy-to-use Audio Visualizer for Android.
Stars: ✭ 581 (-5.37%)
Mutual labels:  audio

AudioPlayer

Build Status Carthage compatible CocoaPods Compatible Platform iOS | tvOS Contact

AudioPlayer is a wrapper around AVPlayer. It also offers cool features such as:

  • Quality control based on number of interruption (buffering) and time delay
  • Retry if player fails
  • Connection handling
  • Audio item enqueuing
  • Player mode (Repeat, Repeat all, Shuffle)
  • MPNowPlayingInfoCenter
  • A high level of customization

Installation

  • CocoaPods: pod 'KDEAudioPlayer'
  • Carthage: github "delannoyk/AudioPlayer"

Usage

Basics

let delegate: AudioPlayerDelegate = ...

let player = AudioPlayer()
player.delegate = delegate
let item = AudioItem(mediumQualitySoundURL: track.streamURL)
player.playItem(item)

Delegate

In order to alert about status change or other events, AudioPlayer uses delegation.

State

When AudioPlayer’s state changes, the method

func audioPlayer(audioPlayer: AudioPlayer, didChangeStateFrom from: AudioPlayerState, toState to: AudioPlayerState)

is called.

Duration & progression

When AudioPlayer’s current item found duration of its content

func audioPlayer(audioPlayer: AudioPlayer, didFindDuration duration: NSTimeInterval, forItem item: AudioItem)

is called.

This method is called regularly to notify progression update.

func audioPlayer(audioPlayer: AudioPlayer, didUpdateProgressionToTime time: NSTimeInterval, percentageRead: Float)

percentageRead is a Float value between 0 & 100 so that you can easily update an UISlider for example.

Queue

func audioPlayer(audioPlayer: AudioPlayer, willStartPlayingItem item: AudioItem)

Control Center / Lockscreen

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    application.beginReceivingRemoteControlEvents()
}

//Then in your UIResponder (or your AppDelegate if you will)
override func remoteControlReceivedWithEvent(event: UIEvent?) {
    if let event = event {
        yourPlayer.remoteControlReceivedWithEvent(event)
    }
}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Todo list

  • Add a fully working example project
  • Integrate with SPM
  • Add more unit tests
  • Add Objective-C support if possible (#67)
  • Refactor current state handling

License

The MIT License (MIT)

Copyright (c) 2015 Kevin Delannoy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].