All Projects → calm → Persistentstreamplayer

calm / Persistentstreamplayer

Licence: mit
Stream audio over http, and persist the data to a local file while buffering

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Persistentstreamplayer

React Native Audio Streaming
iOS & Android react native module to play an audio stream, with background support and media controls
Stars: ✭ 753 (+527.5%)
Mutual labels:  audio, player, streaming
Awesome Video
A curated list of awesome streaming video tools, frameworks, libraries, and learning resources.
Stars: ✭ 397 (+230.83%)
Mutual labels:  audio, player, streaming
Aplay
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
Stars: ✭ 44 (-63.33%)
Mutual labels:  audio, player, streaming
Hysteriaplayer
Objective-C audio player, sitting on top of AVPlayer
Stars: ✭ 568 (+373.33%)
Mutual labels:  audio, player, streaming
Pandoraplayer
🅿️ PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift.
Stars: ✭ 1,037 (+764.17%)
Mutual labels:  audio, player, streaming
React Native Jw Media Player
React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
Stars: ✭ 76 (-36.67%)
Mutual labels:  audio, player
Android Rtmp Muxer
Implementation of the RTMP protocol to broadcast video and audio on Android in pure Java
Stars: ✭ 78 (-35%)
Mutual labels:  audio, streaming
Rtp
A Go implementation of RTP
Stars: ✭ 120 (+0%)
Mutual labels:  audio, streaming
React Cassette Player
Simple ReactJS HTML5 audio player component built with SVG icons from The Noun Project.
Stars: ✭ 93 (-22.5%)
Mutual labels:  audio, player
Audioplayers
A Flutter plugin to play multiple audio files simultaneously (Android/iOS)
Stars: ✭ 1,042 (+768.33%)
Mutual labels:  audio, player
Arduino Music Player
MOD/S3M/XM/IT Music Player for Arduino
Stars: ✭ 85 (-29.17%)
Mutual labels:  audio, player
Winyl
Winyl's main repository.
Stars: ✭ 97 (-19.17%)
Mutual labels:  audio, player
Nexplayer unity plugin
Stream videos in HLS & DASH with Widevine DRM using NexPlayer Video Streaming Player SDK for Unity on Android & iOS devices
Stars: ✭ 73 (-39.17%)
Mutual labels:  player, streaming
Bibleify Desktop
🖥️Simple & fast bible app with dramatized audio built with Electron, React, Rematch & Realm
Stars: ✭ 70 (-41.67%)
Mutual labels:  audio, streaming
Muse
🎧 All you need is a simple and diligent HTML 5 music player written in React.
Stars: ✭ 82 (-31.67%)
Mutual labels:  audio, player
Wjplayer
Video.js bundle that supports HLS, VAST/VMAP, 360-degree videos, and more.
Stars: ✭ 55 (-54.17%)
Mutual labels:  audio, player
Sjmediacacheserver
A HTTP Media Caching Framework. It can cache FILE or HLS media. 音视频边播边缓存框架, 支持 HLS(m3u8) 和 FILE(mp4, mp3等).
Stars: ✭ 87 (-27.5%)
Mutual labels:  audio, player
Vue Howler
[UNMAINTAINED] A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components
Stars: ✭ 103 (-14.17%)
Mutual labels:  audio, player
Hls.js
HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
Stars: ✭ 10,791 (+8892.5%)
Mutual labels:  player, streaming
Nymphcast
Audio and video casting system with support for custom applications.
Stars: ✭ 2,010 (+1575%)
Mutual labels:  audio, streaming

PersistentStreamPlayer

Handles the playing of an audio file while streaming, and saves the data to a local URL as soon as the stream completes. Battle-tested in the production version of Calm

Installation

Add this to your Podfile

pod 'PersistentStreamPlayer'

Usage

PersistentStreamPlayer *remoteAudioPlayer = [[PersistentStreamPlayer alloc] initWithRemoteURL:myHTTPURL
                                                                                     localURL:myFileURL];
remoteAudioPlayer.delegate = self;
[remoteAudioPlayer play];

Features

  • streaming of audio file, starting playback as soon as first data is available
  • also saves streamed data to a file URL as soon as the buffer completes
  • simple play, pause and destroy methods (destroy clears all memory resources)
  • ability to seamlessly loop the audio file. call player.looping = YES
  • exposes timeBuffered, helpful for displaying buffer progress bars in the UI
  • handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
  • does not keep audio file data in memory, so that it supports large files that don't fit in RAM

The PersistentStreamPlayerDelegate protocol has some helpful event indicators, all optional:

/* called when the data is saved to localURL */
- (void)persistentStreamPlayerDidPersistAsset:(PersistentStreamPlayer *)player;

/* called when the audio file completed */
- (void)persistentStreamPlayerDidFinishPlaying:(PersistentStreamPlayer *)player;

/* called when the play head reaches the buffer head */
- (void)persistentStreamPlayerStreamingDidStall:(PersistentStreamPlayer *)player;

/* called as soon as the asset loads with a duration, helpful for showing a duration clock */
- (void)persistentStreamPlayerDidLoadAsset:(PersistentStreamPlayer *)player;

/* on failure to load asset */
- (void)persistentStreamPlayerDidFailToLoadAsset:(PersistentStreamPlayer *)player;
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].