{"id":24896742,"url":"https://github.com/calm/PersistentStreamPlayer","last_synced_at":"2025-10-16T11:31:05.843Z","repository":{"id":62450632,"uuid":"70282383","full_name":"calm/PersistentStreamPlayer","owner":"calm","description":"Stream audio over http, and persist the data to a local file while buffering","archived":true,"fork":false,"pushed_at":"2020-07-12T09:27:27.000Z","size":13,"stargazers_count":135,"open_issues_count":6,"forks_count":29,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-07-24T17:45:59.138Z","etag":null,"topics":["audio","ios","objective-c","persistence","player","streaming","swift","video"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-07T20:58:08.000Z","updated_at":"2025-07-09T17:45:49.000Z","dependencies_parsed_at":"2022-11-01T23:33:11.294Z","dependency_job_id":null,"html_url":"https://github.com/calm/PersistentStreamPlayer","commit_stats":null,"previous_names":["calmcom/persistentstreamplayer"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/calm/PersistentStreamPlayer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calm%2FPersistentStreamPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calm%2FPersistentStreamPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calm%2FPersistentStreamPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calm%2FPersistentStreamPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calm","download_url":"https://codeload.github.com/calm/PersistentStreamPlayer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calm%2FPersistentStreamPlayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279183660,"owners_count":26121444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","ios","objective-c","persistence","player","streaming","swift","video"],"created_at":"2025-02-01T20:15:04.452Z","updated_at":"2025-10-16T11:31:05.600Z","avatar_url":"https://github.com/calm.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PersistentStreamPlayer\n\nHandles 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](https://www.calm.com/ios)\n\n### Installation\n\nAdd this to your [Podfile](https://cocoapods.org/)\n\n```\npod 'PersistentStreamPlayer'\n```\n\n### Usage\n\n```\nPersistentStreamPlayer *remoteAudioPlayer = [[PersistentStreamPlayer alloc] initWithRemoteURL:myHTTPURL\n                                                                                     localURL:myFileURL];\nremoteAudioPlayer.delegate = self;\n[remoteAudioPlayer play];\n```\n\n### Features\n\n* streaming of audio file, starting playback as soon as first data is available\n* **also** saves streamed data to a file URL as soon as the buffer completes\n* simple `play`, `pause` and `destroy` methods (`destroy` clears all memory resources)\n* ability to seamlessly loop the audio file. call `player.looping = YES`\n* exposes `timeBuffered`, helpful for displaying buffer progress bars in the UI\n* handles re-starting the audio file after the buffer stream stalls (e.g. slow network)\n* does not keep audio file data in memory, so that it supports large files that don't fit in RAM\n\nThe `PersistentStreamPlayerDelegate` protocol has some helpful event indicators, all optional:\n\n```\n/* called when the data is saved to localURL */\n- (void)persistentStreamPlayerDidPersistAsset:(PersistentStreamPlayer *)player;\n\n/* called when the audio file completed */\n- (void)persistentStreamPlayerDidFinishPlaying:(PersistentStreamPlayer *)player;\n\n/* called when the play head reaches the buffer head */\n- (void)persistentStreamPlayerStreamingDidStall:(PersistentStreamPlayer *)player;\n\n/* called as soon as the asset loads with a duration, helpful for showing a duration clock */\n- (void)persistentStreamPlayerDidLoadAsset:(PersistentStreamPlayer *)player;\n\n/* on failure to load asset */\n- (void)persistentStreamPlayerDidFailToLoadAsset:(PersistentStreamPlayer *)player;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalm%2FPersistentStreamPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalm%2FPersistentStreamPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalm%2FPersistentStreamPlayer/lists"}