JGMusicManager.h
984 Bytes
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
//
// JGMusicManager.h
// 视频音频-Demo
//
// Created by stkcctv on 16/8/25.
// Copyright © 2016年 stkcctv. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@protocol JGMusicManagerDelegate <NSObject>
- (void)lastMusic;
- (void)NextMusic;
@end
@interface JGMusicManager : NSObject
/** 音乐数组 */
@property (nonatomic, strong) NSMutableArray *musicArray;
/** 索引 */
@property (nonatomic, assign) NSInteger index;
/** 是否播放 */
@property (nonatomic, assign) BOOL isPlay;
/** player */
@property (nonatomic, strong) AVPlayer *player;
@property (nonatomic, weak) id<JGMusicManagerDelegate> delegate;
+ (instancetype)shareMusicManager;
- (void)playStop;
- (void)playAndPause;
- (void)playPrevious;
- (void)playNext;
- (void)replaceItemWithDictionary:(NSDictionary *)dictionary;
- (void)playerVolumeWithVolumeFloat:(CGFloat)volumeFloat;
- (void)playerProgressWithProgressFloat:(CGFloat)progressFloat;
@end