FSVoiceBubble 0.1.0

FSVoiceBubble 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2015

Maintained by Wenchao Ding.




  • By
  • f33chobits

A short light-weight voice bubble to let you:
1. Play a short audio (online supported)
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

Version notes

Version 0.1.0

  • Add download-and-play support(caching will be supported later)
  • Optimize loading speed
  • Bug fix

Version 0.0.2

  • Add textInset and waveInset

Version 0.0.1

  • Initial Release

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, [email protected]

License

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