|
@@ -250,6 +250,12 @@ NSURL * MKRUrlWithString(NSString *string){
|
|
|
}
|
|
|
|
|
|
- (void)preparePlay{
|
|
|
+ BOOL shouldPlay = YES;
|
|
|
+ if (self.delegate && [self.delegate respondsToSelector:@selector(willPreparePlayAtIndex:)]) {
|
|
|
+ shouldPlay = [self.delegate willPreparePlayAtIndex:self.currentIndex];
|
|
|
+ }
|
|
|
+ if (!shouldPlay) return;
|
|
|
+
|
|
|
if (self.delegate && [self.delegate respondsToSelector:@selector(songPlayUrlWithIndex:completion:)]) {
|
|
|
__weak __typeof(self)weakSelf = self;
|
|
|
[self.delegate songPlayUrlWithIndex:self.currentIndex completion:^(NSString * _Nonnull resourceUrl) {
|