-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudioPlayer.h
49 lines (36 loc) · 1.01 KB
/
AudioPlayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// AudioPlayer.h
// VKMusic
//
// Created by Evgeniy Kirpichenko on 1/6/13.
// Copyright (c) 2013 Evgeniy Kirpichenko. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Audio.h"
typedef enum {
kAudioPlayerStateReady = 0,
kAudioPlayerStatePlaying,
kAudioPlayerStatePaused,
kAudioPlayerStateUnconfigured
} AudioPlayerState;
@class AVPlayer;
@class AudioRouteChangeListener;
@interface AudioPlayer : UIResponder {
AVPlayer *player;
}
+ (id)sharedInstance;
- (void)play;
- (void)playAudioAtIndex:(NSInteger) index;
- (void)playNextAudio;
- (void)playPreviousAudio;
- (void)resume;
- (void)pause;
- (void)stop;
- (void)setProgress:(float)progress;
- (void)processAudioEvent:(UIEventSubtype)type;
@property (nonatomic, copy) NSArray *audioList;
@property (nonatomic,readonly) AudioPlayerState state;
@property (nonatomic,readonly) NSInteger playingIndex;
@property (nonatomic,readonly) id<Audio> playingAudio;
@property (nonatomic,readonly) NSTimeInterval playingAudioTime;
@end