Browse Source

版本升级维护

yyqxiaoyin 5 năm trước cách đây
mục cha
commit
d056a41994

+ 5 - 12
MKRRadioManager/Classes/MKRRadioManager/MKRAVPlayer/MKRAVPlayer.h

@@ -130,19 +130,12 @@ typedef enum : NSUInteger {
 /**
  当前播放进度
  */
-//@property (nonatomic, assign) NSInteger currentTime;
-//
-///**
-// 总时长
-// */
-//@property (nonatomic, assign) NSInteger totalTime;
-
-
-/// 当前播放进度
-@property (nonatomic, assign) NSTimeInterval currentDuration;
+@property (nonatomic, assign) NSTimeInterval currentTime;
 
-/// 总时长
-@property (nonatomic, assign) NSTimeInterval totalDuration;
+/**
+ 总时长
+ */
+@property (nonatomic, assign) NSTimeInterval totalTime;
 
 /**
  播放

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

@@ -31,12 +31,12 @@ typedef NS_ENUM(NSUInteger, MKRResourcePlayState) {
 /*
  * 当前播放秒数
  * */
-@property(nonatomic, assign) NSInteger currentTime;
+@property(nonatomic, assign) NSTimeInterval currentTime;
 
 /*
  * 资源总时长
  * */
-@property(nonatomic, assign) NSInteger totalTime;
+@property(nonatomic, assign) NSTimeInterval totalTime;
 
 /*
  * 当前播放时间字符串 格式:xx:xx:xx

+ 4 - 4
MKRRadioManager/Classes/MKRRadioManager/MKRAVPlayer/MKRPlayResourceStatus.m

@@ -13,8 +13,8 @@
     if (self.currentTime == 0){
         return @"00:00";
     }
-    int seconds = self.currentTime % 60;
-    int minutes = (self.currentTime / 60) % 60;
+    int seconds = (int) self.currentTime % 60;
+    int minutes = ((int)self.currentTime / 60) % 60;
     int hours = (int)self.currentTime / 3600;
     if (!hours){
         return [NSString stringWithFormat:@"%02d:%02d",minutes,seconds];
@@ -27,8 +27,8 @@
     if (self.totalTime == 0){
         return @"00:00";
     }
-    int seconds = self.totalTime % 60;
-    int minutes = (self.totalTime / 60) % 60;
+    int seconds = (int)self.totalTime % 60;
+    int minutes = ((int)self.totalTime / 60) % 60;
     int hours = (int)self.totalTime / 3600;
     if (!hours){
         return [NSString stringWithFormat:@"%02d:%02d",minutes,seconds];