Giter Site home page Giter Site logo

eecircularmusicplayercontrol's Introduction

EECircularMusicPlayerControl

EECircularMusicPlayerControl is a UI control to play a music and indicate its progress. It's easy to use in your project, and supports customization of the colors applied to the component parts.

Screenshot

Installation

Copy the files in "EECircularMusicPlayerControl" directory to your project.

Usage

First, create a class that conforms to EECircularMusicPlayerControlDelegate protocol, which has currentTime method. Usually it can be a UIViewController where an EECircularMusicPlayerControl is placed.

Then, set delegate property of the EECircularMusicPlayerControl.

self.yourCircularMusicPlayerControl.delegate = self; // Or any delegate.

At last, set duration property of the control.

self.yourCircularMusicPlayerControl.duration = self.yourAudioPlayer.duration;

That's all you have to do! The example app in "EECircularMusicPlayerExample" directory shows a practical example to use the control with AVAudioPlayer. There is another way to use EECircularMusicPlayerControl without the delegate. Refet to example #2 in the example app to see how to use it without the delegate.

Customization

The following properties can be customized to make your own appearance:

  • progressTrackRatio
  • trackTintColor
  • highlightedTrackTintColor
  • progressTintColor
  • highlightedProgressTintColor
  • buttonTopTintColor
  • highlightedButtonTopTintColor
  • buttonBottomTintColor
  • highlightedButtonBottomTintColor
  • iconColor
  • highlightedIconColor

Roadmap

The following features shall be implemented in the next update. If you implement one of the features, please feel free to send a pull request.

  • Add paused state. Current version has only playing and stopped states.
  • Add shadow or gradient effects to draw the control. Currently it's filled with solid colors.

LEGAL

DACircularProgress

EECircularMusicPlayerControl contains DACircularProgress by Daniel Amitay available under MIT license. Refer to "LICENSE.md" and "README.md" files in "DACircularProgress" directory for more information.

XTC of Gold (Sample Audio)

The example project contains the music "XTC of Gold" by Beatnabob, also known as Jimdubtrix, available under a Creative Commons Attribution-NoDerivs license.

License

EECircularMusicPlayerControl is available under MIT license. Refert to "LICENSE.txt" file for details.

Credits

If you are going to use EECircularMusicPlayerControl in your project, proper attribution would be nice.

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.