Latest 0.1.5
Homepage https://github.com/nickcheng/NCMusicEngine
License MIT
Platforms ios 5.0, requires ARC
Dependencies AFNetworking
Authors

A simple and easy-to-use music engine support playing-while-downloading feature.

Features

  • Playing music while downloading.
  • Cache downloaded music to disk. You can specify the cache key.
  • Tracking downloading and playing progress.
  • Background playing.
  • Handle interruption.(eg. A coming call)

Dependence

All dependences are setted as sub module.

  • AFDownloadRequestOperation:
  • AFNetworking
  • ARC only

Usage

Just playing:

NCMusicEngine *player = [[NCMusicEngine alloc] init];
player.delegate = self; // If you need...
[player playUrl:url];

NCMusicEngine generates cache key from your music url by default. If you need to manage it yourself, you could use the following method:

[player playUrl:url withCacheKey:@"cachekey"];

Tracking progress please use the following delegates:

- (void)engine:(NCMusicEngine *)engine didChangePlayState:(NCMusicEnginePlayState)playState;
- (void)engine:(NCMusicEngine *)engine didChangeDownloadState:(NCMusicEngineDownloadState)downloadState;
- (void)engine:(NCMusicEngine *)engine downloadProgress:(CGFloat)progress;
- (void)engine:(NCMusicEngine *)engine playProgress:(CGFloat)progress;

Future

I’ll keep polishing this engine and keep adding new features. If you have any problems when using this engine, please feel free to drop me an issue or contact me:

Latest podspec

{
    "name": "NCMusicEngine",
    "version": "0.1.5",
    "summary": "A simple and easy-to-use music engine support playing-while-downloading feature.",
    "homepage": "https://github.com/nickcheng/NCMusicEngine",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "nickcheng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nickcheng/NCMusicEngine.git",
        "tag": "0.1.5"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": [
        "NCMusicEngine/*.{h,m}",
        "AFDownloadRequestOperation/*.{h,m}"
    ],
    "public_header_files": [
        "NCMusicEngine/*.h",
        "AFDownloadRequestOperation/*.h"
    ],
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "~> 1.1"
        ]
    }
}

Pin It on Pinterest

Share This