Coder Social home page Coder Social logo

chapayghub / aumediaplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appunite/aumediaplayer

0.0 3.0 0.0 5.18 MB

AUMediaPlayer is a nice high level API for audio and video playback, both from network stream and local files.

Home Page: https://appunite.com

License: MIT License

Ruby 0.37% Objective-C 96.95% C 1.08% Shell 1.59%

aumediaplayer's Introduction

AUMediaPlayer

CI Status Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Features

  • Audio playback (local file and network stream)
  • Video playback (local file and network stream)
  • Downloading and storing media files (playback occurs automatically from local file, if one is available)
  • Convenient, KVO based mechanism for desplayinf playback info to user
  • Shuffle
  • Repeat queue (or repeat one track endlessly...)
  • Background playback with built in interruptions (i.e. phone calls) management
  • Displaying media info on lock screen
  • Lock screen controls

AUMediaPlayer is a library allowing audio and video playback, both from network stream and local files. It features all the common stuff you may expect, like queues, shuffle, repeat. It has convenient progress observation mechanism based on KVO. It automatically sets media info for lock screen displaying and works with lock screen controls. It also manages interruptions. Library object is included as well. It allows to download and store media. Since then they are automatically played from local files.

AUMediaPlayer header files contain commented out code snippets, which allow you to setup whole playback mechanism quickly. Example project is also included.

alt tag

Some basic methods

AUMediaPlayer class

Play item:

- (void)playItem:(id<AUMediaItem>)item error:(NSError * __autoreleasing *)error;

Play queue:

- (void)playItemQueue:(id<AUMediaItemCollection>)collection error:(NSError * __autoreleasing *)error;

Play another item from current queue:

- (void)playItemFromCurrentQueueAtIndex:(NSUInteger)index;
- (BOOL)tryPlayingItemFromCurrentQueue:(id<AUMediaItem>)item;

Control playback:

- (void)play;
- (void)pause;
- (void)stop;
- (void)playNext;
- (void)playPrevious;

Seek to specific moment (value from 0 to 1):

- (void)seekToMoment:(double)moment;

Set shuffle and repeat options:

- (void)setShuffleOn:(BOOL)shuffle;
- (void)setRepeatMode:(AUMediaRepeatMode)repeat;
- (void)toggleRepeatMode;

AUMediaLibrary class

Download:

- (NSProgress *)downloadItem:(id<AUMediaItem>)item;
- (void)cancelDownloadForItem:(id<AUMediaItem>)item;
- (NSProgress *)progressObjectForItem:(id<AUMediaItem>)item;
- (void)downloadItemCollection:(id<AUMediaItemCollection>)collection;

Check status:

- (BOOL)itemIsDownloaded:(id<AUMediaItem>)item;
- (BOOL)itemCollectionIsDownloaded:(id<AUMediaItemCollection>)collection;

Get all items ot items from specific category (audio or video):

- (NSArray *)downloadingItems;
- (NSDictionary *)allExistingItems;
- (NSDictionary *)existingItemsForType:(AUMediaType)type;

Remove items:

- (void)removeItemFromLibrary:(id<AUMediaItem>)item error:(NSError * __autoreleasing*)error;
- (void)removeCollectionFromLibrary:(id<AUMediaItemCollection>)collecion error:(NSError * __autoreleasing*)error;
- (void)cleanLibraryError:(NSError * __autoreleasing*)error;

Requirements

AUMediaPlayers requires ARC. Deployment target: iOS7. Requires AFNetworking dependency.

Installation

AUMediaPlayer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "AUMediaPlayer"

Credits

Thanks to AppUnite and @piotrbernad, who has authored the library class in major part.

Author

lukasz.kasperek, [email protected]

License

AUMediaPlayer is available under the MIT license. See the LICENSE file for more info.

aumediaplayer's People

Contributors

lukkas avatar

Watchers

James Cloos avatar Chapay avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.