| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- //
- // AccompanyView.h
- // TeacherDaya
- //
- // Created by Kyle on 2021/3/9.
- // Copyright © 2021 DayaMusic. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
- ACCOMPANYACTION_ADDSONG, // 添加伴奏
- ACCOMPANYACTION_PLAYSONG, // 播放
- ACCOMPANYACTION_STOP, // 停止
- ACCOMPANYACTION_DISPLAY, // 下载状态显示
- ACCOMPANYACTION_CHOOSE, // 选中回调
- ACCOMPANYACTION_MODIFY_VOLUME, // 修改音量
- };
- typedef void(^AccompanyTargetBlock)(ACCOMPANYACTION action, NSString * _Nullable songId, NSString * _Nullable songName, BOOL isAccompany);
- typedef void(^AccompanyPlayAction)(ACCOMPANYACTION action, NSString * _Nullable songId, NSString * _Nullable songName, BOOL isAccompany, NSString *_Nullable songUrl);
- NS_ASSUME_NONNULL_BEGIN
- @interface AccompanyView : UIView
- /** 播放音量 范围0-100 */
- @property (nonatomic, assign) NSInteger volume;
- @property (nonatomic, assign) BOOL isShow;
- @property (nonatomic, assign) BOOL isPlaying;
- @property (nonatomic, strong) UIButton *playButton;
- @property (nonatomic, assign) BOOL hideDownloadStatus;
- - (void)showAccompanyView;
- - (void)targetAction:(AccompanyTargetBlock)callback;
- - (void)accompanyPlayAction:(AccompanyPlayAction)actionBlock;
- - (void)refreshView;
- - (void)refreshWithSongId:(NSString *)songId;
- - (void)refreshAllSongStatus;
- - (void)dismissAlertView;
- @end
- NS_ASSUME_NONNULL_END
|