A short light-weight voice bubble to let you:
- Play a short audio
- Show wave effect while playing
- Customize your own style(wave color、bubble image .etc)
- cocoapods:
pod "FSVoiceBubble"
- manually:
Drag all Classes under Pod/Classes into your project. Drag
FSVoiceBubble.bundle
(Pod/Assets) into your project.
#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
- 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.
iOS7.0
Wenchao Ding, [email protected]
FSVoiceBubble is available under the MIT license. See the LICENSE file for more info.