//
//  BackgroundMusic.h
//  JoywayLib
//
//  Created by Bob Xia on 2021/1/28.
//  Copyright © 2021 ___JOYWAY___. All rights reserved.
//

#ifndef BackgroundMusic_h
#define BackgroundMusic_h

#import <AVFoundation/AVFoundation.h>
#import <AVFoundation/AVCaptureDevice.h>
#import <AVFoundation/AVMediaFormat.h>


@interface BackgroundMusic : NSObject <AVAudioPlayerDelegate>

- (void)setBackgroundMusicWithFileName:(NSString*)fileName fileType:(NSString*)fileType;
// delegate 播放器代理 播放完成的时候再次播放
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag;
/**  播放背景音乐*/
- (void)playMusic;
/**  停止背景音乐*/
- (void)stopMusic;


@end


#endif /* AudioPlayer_h */
