Skip to content

mohsinalimat/FSVoiceBubble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSVoiceBubble

Version License Platform

A short light-weight voice bubble to let you:

  1. Play a short audio
  2. Show wave effect while playing
  3. Customize your own style(wave color、bubble image .etc)

Screenshots

It's strong enough to be embedded into tableView

fsvoicebubble-tableview

A Colorful Example

fsvoicebubble-style

Installation

  • cocoapods:
pod "FSVoiceBubble"
  • manually: Drag all Classes under Pod/Classes into your project. Drag FSVoiceBubble.bundle(Pod/Assets) into your project.

Usage

#import "FSVoiceBubble.h"

The header file is quite clear:)

@interface FSVoiceBubble : UIView

@property (strong, nonatomic) NSURL   *contentURL;
@property (strong, nonatomic) IBInspectable UIColor *waveColor;
@property (strong, nonatomic) IBInspectable UIColor *animatingWaveColor;
@property (strong, nonatomic) IBInspectable UIImage *bubbleImage;
@property (assign, nonatomic) IBInspectable BOOL    invert;
@property (assign, nonatomic) IBInspectable BOOL    exclusive;
@property (assign, nonatomic) IBInspectable BOOL    durationInsideBubble;
@property (assign, nonatomic) IBOutlet id<FSVoiceBubbleDelegate> delegate;

- (void)prepareToPlay;
- (void)play;
- (void)pause;
- (void)stop;

- (void)startAnimating;
- (void)stopAnimating;

@end

@protocol FSVoiceBubbleDelegate <NSObject>

- (void)voiceBubbleDidStartPlaying:(FSVoiceBubble *)voiceBubble;

@end

Notice

  • The purpose for this lib is to play short voice files. Don't try to play an audio longer the 60 seconds
  • Only support local file at this moment.

Requirements

iOS7.0

Author

Wenchao Ding, f33chobits@gmail.com

License

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