|
@@ -145,7 +145,7 @@
|
|
_progressingView.backgroundColor = [UIColor hwColor:@"#333333"];
|
|
_progressingView.backgroundColor = [UIColor hwColor:@"#333333"];
|
|
[_progressingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[_progressingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(0.f);
|
|
make.left.mas_equalTo(0.f);
|
|
- make.right.mas_equalTo(0);
|
|
|
|
|
|
+ make.width.mas_equalTo(0);
|
|
make.top.mas_equalTo(0);
|
|
make.top.mas_equalTo(0);
|
|
make.height.mas_equalTo(2.f);
|
|
make.height.mas_equalTo(2.f);
|
|
}];
|
|
}];
|
|
@@ -157,7 +157,7 @@
|
|
_progressYuanView.layer.masksToBounds = YES;
|
|
_progressYuanView.layer.masksToBounds = YES;
|
|
_progressYuanView.backgroundColor = [UIColor hwColor:@"#333333"];
|
|
_progressYuanView.backgroundColor = [UIColor hwColor:@"#333333"];
|
|
[_progressYuanView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[_progressYuanView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
- make.left.mas_equalTo(20.f);
|
|
|
|
|
|
+ make.left.equalTo(_progressBgView.mas_left).offset(0.0);
|
|
make.centerY.equalTo(_progressingView.mas_centerY);
|
|
make.centerY.equalTo(_progressingView.mas_centerY);
|
|
make.width.mas_equalTo(6.f);
|
|
make.width.mas_equalTo(6.f);
|
|
make.height.mas_equalTo(6.f);
|
|
make.height.mas_equalTo(6.f);
|
|
@@ -218,6 +218,8 @@
|
|
_playOrPauseButton = [[UIButton alloc] init];
|
|
_playOrPauseButton = [[UIButton alloc] init];
|
|
[_playOrPauseButton setImage:[UIImage imageNamed:@"record_player_icon"] forState:UIControlStateNormal];
|
|
[_playOrPauseButton setImage:[UIImage imageNamed:@"record_player_icon"] forState:UIControlStateNormal];
|
|
[_playOrPauseButton setImage:[UIImage imageNamed:@"record_pause_icon"] forState:UIControlStateSelected];
|
|
[_playOrPauseButton setImage:[UIImage imageNamed:@"record_pause_icon"] forState:UIControlStateSelected];
|
|
|
|
+ _playOrPauseButton.tag = 10;
|
|
|
|
+ [_playOrPauseButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
[_cellBg2View addSubview:_playOrPauseButton];
|
|
[_cellBg2View addSubview:_playOrPauseButton];
|
|
|
|
|
|
[_playOrPauseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[_playOrPauseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
@@ -230,6 +232,8 @@
|
|
//后退
|
|
//后退
|
|
_backwardButton = [[UIButton alloc] init];
|
|
_backwardButton = [[UIButton alloc] init];
|
|
[_backwardButton setImage:[UIImage imageNamed:@"record_backward_icon"] forState:UIControlStateNormal];
|
|
[_backwardButton setImage:[UIImage imageNamed:@"record_backward_icon"] forState:UIControlStateNormal];
|
|
|
|
+ _backwardButton.tag = 11;
|
|
|
|
+ [_backwardButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
[_cellBg2View addSubview:_backwardButton];
|
|
[_cellBg2View addSubview:_backwardButton];
|
|
|
|
|
|
[_backwardButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[_backwardButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
@@ -242,6 +246,8 @@
|
|
//前进
|
|
//前进
|
|
_forwardButton = [[UIButton alloc] init];
|
|
_forwardButton = [[UIButton alloc] init];
|
|
[_forwardButton setImage:[UIImage imageNamed:@"record_forward_icon"] forState:UIControlStateNormal];
|
|
[_forwardButton setImage:[UIImage imageNamed:@"record_forward_icon"] forState:UIControlStateNormal];
|
|
|
|
+ _forwardButton.tag = 12;
|
|
|
|
+ [_forwardButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
[_cellBg2View addSubview:_forwardButton];
|
|
[_cellBg2View addSubview:_forwardButton];
|
|
|
|
|
|
[_forwardButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[_forwardButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
@@ -257,6 +263,14 @@
|
|
- (void)didClickButFun:(UIButton*)but
|
|
- (void)didClickButFun:(UIButton*)but
|
|
{
|
|
{
|
|
NSInteger tag = but.tag;
|
|
NSInteger tag = but.tag;
|
|
|
|
+
|
|
|
|
+ if(but == _playOrPauseButton){
|
|
|
|
+ if (_playOrPauseButton.selected) {
|
|
|
|
+ tag = 100;
|
|
|
|
+ }
|
|
|
|
+ _playOrPauseButton.selected = !_playOrPauseButton.selected;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (_didClickRecordButFun) {
|
|
if (_didClickRecordButFun) {
|
|
_didClickRecordButFun(tag);
|
|
_didClickRecordButFun(tag);
|
|
}
|
|
}
|
|
@@ -298,6 +312,13 @@
|
|
totalSizeStr = [[NSString alloc] initWithFormat:@"%.2fG",totalSize_k/1024.0/1024.0];
|
|
totalSizeStr = [[NSString alloc] initWithFormat:@"%.2fG",totalSize_k/1024.0/1024.0];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (_curRecordFileModel.isPlayingType) {
|
|
|
|
+ _playOrPauseButton.selected = YES;
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ _playOrPauseButton.selected = NO;
|
|
|
|
+ }
|
|
|
|
+
|
|
// 时长 totalTime
|
|
// 时长 totalTime
|
|
NSInteger hour = 0;
|
|
NSInteger hour = 0;
|
|
NSInteger min = 0;
|
|
NSInteger min = 0;
|
|
@@ -307,13 +328,43 @@
|
|
min = (_curRecordFileModel.totalTime -60*hour)/60;
|
|
min = (_curRecordFileModel.totalTime -60*hour)/60;
|
|
second = _curRecordFileModel.totalTime -60*hour - 60 *min;
|
|
second = _curRecordFileModel.totalTime -60*hour - 60 *min;
|
|
|
|
|
|
- NSString* totalTimeStr = [[NSString alloc] initWithFormat:@"%02ld:%02ld:%02ld",hour,min,second];;
|
|
|
|
|
|
+ NSString* totalTimeStr = [[NSString alloc] initWithFormat:@"%02ld:%02ld:%02ld",hour,min,second];
|
|
|
|
|
|
_timeAndSizeLabel.text = [[NSString alloc] initWithFormat:@"%@ %@",totalTimeStr,totalSizeStr];
|
|
_timeAndSizeLabel.text = [[NSString alloc] initWithFormat:@"%@ %@",totalTimeStr,totalSizeStr];
|
|
-
|
|
|
|
- _progressingLabel.text = @"00:00:00";
|
|
|
|
_totaltimeLabel.text = totalTimeStr;
|
|
_totaltimeLabel.text = totalTimeStr;
|
|
|
|
|
|
|
|
+ //进度相关
|
|
|
|
+ // 播放时长 curPlayerTime
|
|
|
|
+ NSInteger playerhour = 0;
|
|
|
|
+ NSInteger playerMin = 0;
|
|
|
|
+ NSInteger playerSecond = 0;
|
|
|
|
+
|
|
|
|
+ playerhour = _curRecordFileModel.curPlayerTime / 60 /60;
|
|
|
|
+ playerMin = (_curRecordFileModel.curPlayerTime -60*playerhour)/60;
|
|
|
|
+ playerSecond = _curRecordFileModel.curPlayerTime -60*playerhour - 60 *playerMin;
|
|
|
|
+
|
|
|
|
+ NSString* playingTimeStr = [[NSString alloc] initWithFormat:@"%02ld:%02ld:%02ld",playerhour,playerMin,playerSecond];
|
|
|
|
+
|
|
|
|
+ _progressingLabel.text = playingTimeStr;
|
|
|
|
+
|
|
|
|
+ CGFloat progress = _curRecordFileModel.curPlayerTime *1.0 /_curRecordFileModel.totalTime;
|
|
|
|
+ CGFloat BgWidth = _progressBgView.hw_w;
|
|
|
|
+ CGFloat progressingWidth = BgWidth* progress;
|
|
|
|
+
|
|
|
|
+ [_progressingView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
+ make.left.mas_equalTo(0.f);
|
|
|
|
+ make.width.mas_equalTo(progressingWidth);
|
|
|
|
+ make.top.mas_equalTo(0);
|
|
|
|
+ make.height.mas_equalTo(2.f);
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+ [_progressYuanView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
+ make.left.equalTo(_progressingView.mas_right).offset(-2);
|
|
|
|
+ make.centerY.equalTo(_progressingView.mas_centerY);
|
|
|
|
+ make.width.mas_equalTo(6.f);
|
|
|
|
+ make.height.mas_equalTo(6.f);
|
|
|
|
+ }];
|
|
|
|
+
|
|
if(curRecordFileModel.isEditType){
|
|
if(curRecordFileModel.isEditType){
|
|
checkButton.hidden = NO;
|
|
checkButton.hidden = NO;
|
|
|
|
|