//
//  ICMusicPlayManager.h
//  Open
//
//  Created by 雷俊博 on 2020/6/12.
//  Copyright © 2020 黄江涛 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KKListenDetailController.h"
#import "KKPlayerViewController.h"
#import "XMSDK.h"

NS_ASSUME_NONNULL_BEGIN

@interface ICMusicPlayManager : NSObject


//播放进度
@property (nonatomic, copy, nullable) void(^KKPlayerPlayTimeChanged)(CGFloat percent, NSUInteger currentSecond);
//缓冲进度
@property (nonatomic, copy, nullable) void(^KKPlayerBufferTimeChanged)(CGFloat percent);
//播放列表结束
@property (nonatomic, copy, nullable) void(^KKPlayerDidPlaylistEnd)(void);
//开始播放时
@property (nonatomic, copy, nullable) void(^KKPlayerDidStart)(void);
//将要播放时
@property (nonatomic, copy, nullable) void(^KKPlayerWillPlaying)(void);
//已经播放时
@property (nonatomic, copy, nullable) void(^KKPlayerDidPlaying)(void);
//暂停时调用
@property (nonatomic, copy, nullable) void(^KKPlayerDidPaused)(void);
//停止时
@property (nonatomic, copy, nullable) void(^KKPlayerDidStopped)(void);
//结束播放
@property (nonatomic, copy, nullable) void(^KKPlayerDidEnd)(void);
//切换声音时
@property (nonatomic, copy, nullable) void(^KKPlayerDidChangeToTrack)(XMTrack *track);
//播放失败时
@property (nonatomic, copy, nullable) void(^KKPlayerDidFailedToPlayTrack)(XMTrack *track,NSError* error);
//成功替换播放列表时
@property (nonatomic, copy, nullable) void(^KKPlayerDidReplacePlayList)(NSArray * list);
//播放数据请求失败时
@property (nonatomic, copy, nullable) void(^KKPlayerDidError)(NSString * type, NSDictionary* data);
//没有网络情况下播放器因缓冲已播完而停止播放时触发
@property (nonatomic, copy, nullable) void(^KKPlayerDidPausePlayForBadNetwork)(void);

@property (nonatomic, strong)XMAlbum *albumModel;

@property (nonatomic, assign)NSInteger currentPage;

+ (instancetype)sharedManager;



@end

NS_ASSUME_NONNULL_END
