yyqxiaoyin 5 роки тому
батько
коміт
e58fcfb9d6

+ 3 - 3
MKRRadioManager/Classes/MKRRadioManager/MKRAVPlayer/MKRAVPlayer.m

@@ -356,8 +356,8 @@ NSURL * MKRUrlWithString(NSString *string){
     [_player seekToTime:CMTimeMakeWithSeconds(currentTime, NSEC_PER_SEC) completionHandler:^(BOOL finished) {
         dispatch_async(dispatch_get_main_queue(), ^{
             self->_isSeeking = NO;
-//            self.state = MKRAVPlayerStatePlaying;
             [self.player play];
+            self.state = MKRAVPlayerStatePlaying;
         });
     }];
 }
@@ -412,8 +412,8 @@ NSURL * MKRUrlWithString(NSString *string){
     }
     _currentStatus.totalTime = self.totalTime;
     _currentStatus.currentTime = self.currentTime;
-//    _currentStatus.totalDuration = self.totalTime;
-//    _currentStatus.currentDuration = self.currentTime;
+    _currentStatus.totalDuration = self.totalTime;
+    _currentStatus.currentDuration = self.currentTime;
     _currentStatus.isPlaying = [self isPlaying];
     _currentStatus.playState = (MKRResourcePlayState)self.state;
     return _currentStatus;

+ 3 - 3
MKRRadioManager/Classes/MKRRadioManager/MKRAVPlayer/MKRPlayResourceStatus.h

@@ -38,9 +38,9 @@ typedef NS_ENUM(NSUInteger, MKRResourcePlayState) {
  * */
 @property(nonatomic, assign) NSInteger totalTime;
 
-//@property (nonatomic, assign) NSTimeInterval currentDuration;
-//
-//@property (nonatomic, assign) NSTimeInterval totalDuration;
+@property (nonatomic, assign) NSTimeInterval currentDuration;
+
+@property (nonatomic, assign) NSTimeInterval totalDuration;
 
 /*
  * 当前播放时间字符串 格式:xx:xx:xx