Commit a52729477d02d0786a65046f2cd0dc3438479392
1 parent
37a14aeb
no message
Showing
20 changed files
with
54 additions
and
40 deletions
LiveVideoCloud/Classes/Sections/Mine/Controllers/LVCShortVideoController.m
| ... | ... | @@ -118,6 +118,7 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 118 | 118 | |
| 119 | 119 | // 默认开启 前置摄像头 |
| 120 | 120 | _recorder.cameraPosition = AVCaptureDevicePositionFront; |
| 121 | + _previewView.flashBtn.enabled = NO; | |
| 121 | 122 | _recorder.minRecDuration = 3; |
| 122 | 123 | _recorder.maxRecDuration = [_maxDuration intValue]; |
| 123 | 124 | |
| ... | ... | @@ -174,6 +175,7 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 174 | 175 | |
| 175 | 176 | case PreViewSubViewIdx_Flash: { |
| 176 | 177 | |
| 178 | + weakSelf.previewView.flashBtn.selected = !weakSelf.previewView.flashBtn.selected; | |
| 177 | 179 | if ([weakSelf.recorder isTorchSupported]){ |
| 178 | 180 | [weakSelf.recorder toggleTorch]; |
| 179 | 181 | } |
| ... | ... | @@ -184,15 +186,16 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 184 | 186 | case PreViewSubViewIdx_ToggleCamera: { |
| 185 | 187 | |
| 186 | 188 | __strong __typeof(weakSelf) strongSelf = weakSelf; |
| 189 | + | |
| 187 | 190 | [strongSelf.recorder switchCamera]; |
| 191 | + | |
| 188 | 192 | if (strongSelf.recorder.isTorchSupported) { |
| 189 | - // 显示闪光灯按钮 | |
| 190 | - if (strongSelf.recorder.isTorchSupported) { | |
| 191 | - weakSelf.previewView.flashBtn.hidden = NO; | |
| 192 | - } } | |
| 193 | - else{ | |
| 194 | - // 隐藏闪光灯按钮 | |
| 195 | - weakSelf.previewView.flashBtn.hidden = YES; | |
| 193 | + | |
| 194 | + weakSelf.previewView.flashBtn.enabled = YES; | |
| 195 | + | |
| 196 | + } else{ | |
| 197 | + | |
| 198 | + weakSelf.previewView.flashBtn.enabled = NO; | |
| 196 | 199 | } |
| 197 | 200 | |
| 198 | 201 | } |
| ... | ... | @@ -209,6 +212,7 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 209 | 212 | break; |
| 210 | 213 | |
| 211 | 214 | case PreViewSubViewIdx_Effects: { |
| 215 | + | |
| 212 | 216 | [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ |
| 213 | 217 | weakSelf.faceUView.frame = kAERootViewShowFrame; |
| 214 | 218 | weakSelf.faceUView.beautyConfigViewIsShowing = YES; |
| ... | ... | @@ -310,7 +314,6 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 310 | 314 | if (extra == 1){//停止录制 |
| 311 | 315 | |
| 312 | 316 | [weakSelf.timesArr addObject:[NSString stringWithFormat:@"%d", weakSelf.tempTime]]; |
| 313 | - NSLog(@"timesArr======%@---%d----%d",weakSelf.timesArr, weakSelf.tempTime, weakSelf.count); | |
| 314 | 317 | |
| 315 | 318 | [weakSelf.recordTimer setFireDate:[NSDate distantFuture]]; |
| 316 | 319 | |
| ... | ... | @@ -433,9 +436,7 @@ UIImagePickerControllerDelegate, BeautyConfigViewDelegate, FaceUFiterViewDelegat |
| 433 | 436 | - (void)onCountUp:(NSTimer *)sender |
| 434 | 437 | { |
| 435 | 438 | self.count ++; |
| 436 | - self.tempTime ++; | |
| 437 | - NSLog(@"tempTime--------%d", _tempTime); | |
| 438 | - | |
| 439 | + self.tempTime ++; | |
| 439 | 440 | self.timeLab.text = [NSString stringWithFormat:@"%02d:%02d",self.count/60,self.count%60]; |
| 440 | 441 | } |
| 441 | 442 | ... | ... |
LiveVideoCloud/Classes/Sections/Mine/Controllers/LVCShortVideoListViewController.m
| ... | ... | @@ -113,6 +113,10 @@ |
| 113 | 113 | [weakSelf.videoCfgView removeFromSuperview]; |
| 114 | 114 | } else { |
| 115 | 115 | |
| 116 | + MBProgressHUD *progressHud = [MBProgressHUD showHUDAddedTo:weakSelf.view animated:YES]; | |
| 117 | + progressHud.mode = MBProgressHUDModeIndeterminate; | |
| 118 | + | |
| 119 | + | |
| 116 | 120 | //鉴权 |
| 117 | 121 | [[CNLiveMediaEditor shareInstance] registerCNMediaEditorKit:^(NSString *maxDuration) { |
| 118 | 122 | |
| ... | ... | @@ -123,13 +127,21 @@ |
| 123 | 127 | [weakSelf presentViewController:cfgVC animated:YES completion:NULL]; |
| 124 | 128 | [weakSelf.videoCfgView removeFromSuperview]; |
| 125 | 129 | |
| 130 | + [MBProgressHUD hideHUDForView:weakSelf.view animated:YES]; | |
| 126 | 131 | }); |
| 127 | 132 | |
| 133 | + | |
| 128 | 134 | } failure:^(NSDictionary *errorDic) { |
| 129 | 135 | |
| 130 | - UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:@"鉴权失败, 请重试!" delegate:nil cancelButtonTitle:@"好 的" otherButtonTitles:nil, nil]; | |
| 131 | - [alertView show]; | |
| 132 | - [weakSelf.videoCfgView removeFromSuperview]; | |
| 136 | + dispatch_async(dispatch_get_main_queue(), ^{ | |
| 137 | + | |
| 138 | + [MBProgressHUD hideHUDForView:weakSelf.view animated:YES]; | |
| 139 | + | |
| 140 | + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:@"鉴权失败, 请重试!" delegate:nil cancelButtonTitle:@"好 的" otherButtonTitles:nil, nil]; | |
| 141 | + [alertView show]; | |
| 142 | + [weakSelf.videoCfgView removeFromSuperview]; | |
| 143 | + }); | |
| 144 | + | |
| 133 | 145 | }]; |
| 134 | 146 | |
| 135 | 147 | } | ... | ... |
LiveVideoCloud/Classes/Sections/Mine/Views/LVCEditorBottomView.m
| ... | ... | @@ -52,22 +52,23 @@ |
| 52 | 52 | #pragma mark - |
| 53 | 53 | #pragma mark - Action |
| 54 | 54 | - (void)editorBtnClick:(UIButton *)btn { |
| 55 | -// self.editorBtn.selected = YES; | |
| 56 | - btn.selected = !btn.selected; | |
| 55 | + _editorBtn.selected = YES; | |
| 56 | + _funcBtn.selected = NO; | |
| 57 | + _filterBtn.selected = NO; | |
| 57 | 58 | _scrollView.contentOffset = CGPointMake(0, 0); |
| 58 | 59 | } |
| 59 | 60 | |
| 60 | 61 | - (void)funcBtnClick:(UIButton *)btn { |
| 61 | -// self.funcBtn.selected = YES; | |
| 62 | - btn.selected = !btn.selected; | |
| 63 | - | |
| 62 | + _editorBtn.selected = NO; | |
| 63 | + _funcBtn.selected = YES; | |
| 64 | + _filterBtn.selected = NO; | |
| 64 | 65 | _scrollView.contentOffset = CGPointMake(KScreenWidth, 0); |
| 65 | 66 | } |
| 66 | 67 | |
| 67 | 68 | - (void)filterBtnClick:(UIButton *)btn { |
| 68 | -// self.filterBtn.selected = YES; | |
| 69 | - btn.selected = !btn.selected; | |
| 70 | - | |
| 69 | + _editorBtn.selected = NO; | |
| 70 | + _funcBtn.selected = NO; | |
| 71 | + _filterBtn.selected = YES; | |
| 71 | 72 | _scrollView.contentOffset = CGPointMake(KScreenWidth*2, 0); |
| 72 | 73 | } |
| 73 | 74 | |
| ... | ... | @@ -107,9 +108,9 @@ |
| 107 | 108 | if (!_filterBtn) { |
| 108 | 109 | _filterBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 109 | 110 | _filterBtn.frame = CGRectMake(BTN_WIDTH*5, 10, BTN_WIDTH, BTN_WIDTH); |
| 110 | - [_filterBtn setImage:[UIImage imageNamed:@"filter normal"] forState:UIControlStateNormal]; | |
| 111 | - [_filterBtn setImage:[UIImage imageNamed:@"filter selested"] forState:UIControlStateHighlighted]; | |
| 112 | 111 | [_filterBtn addTarget:self action:@selector(filterBtnClick:) forControlEvents:UIControlEventTouchUpInside]; |
| 112 | + [_filterBtn setImage:[UIImage imageNamed:@"filter_normal"] forState:UIControlStateNormal]; | |
| 113 | + [_filterBtn setImage:[UIImage imageNamed:@"filter_selected"] forState:UIControlStateSelected]; | |
| 113 | 114 | } |
| 114 | 115 | return _filterBtn; |
| 115 | 116 | } |
| ... | ... | @@ -119,9 +120,9 @@ |
| 119 | 120 | if (!_funcBtn) { |
| 120 | 121 | _funcBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 121 | 122 | _funcBtn.frame = CGRectMake(BTN_WIDTH*3, 10, BTN_WIDTH, BTN_WIDTH); |
| 122 | - [_funcBtn setImage:[UIImage imageNamed:@"more normal"] forState:UIControlStateNormal]; | |
| 123 | - [_funcBtn setImage:[UIImage imageNamed:@"more selested"] forState:UIControlStateSelected]; | |
| 124 | 123 | [_funcBtn addTarget:self action:@selector(funcBtnClick:) forControlEvents:UIControlEventTouchUpInside]; |
| 124 | + [_funcBtn setImage:[UIImage imageNamed:@"func_normal"] forState:UIControlStateNormal]; | |
| 125 | + [_funcBtn setImage:[UIImage imageNamed:@"func_selected"] forState:UIControlStateSelected]; | |
| 125 | 126 | } |
| 126 | 127 | return _funcBtn; |
| 127 | 128 | } |
| ... | ... | @@ -131,9 +132,9 @@ |
| 131 | 132 | if (!_editorBtn) { |
| 132 | 133 | _editorBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 133 | 134 | _editorBtn.frame = CGRectMake(BTN_WIDTH, 10, BTN_WIDTH, BTN_WIDTH); |
| 134 | - [_editorBtn setImage:[UIImage imageNamed:@"editor normal"] forState:UIControlStateNormal]; | |
| 135 | - [_editorBtn setImage:[UIImage imageNamed:@"editor selested"] forState:UIControlStateSelected]; | |
| 136 | 135 | [_editorBtn addTarget:self action:@selector(editorBtnClick:) forControlEvents:UIControlEventTouchUpInside]; |
| 136 | + [_editorBtn setImage:[UIImage imageNamed:@"editor normal"] forState:UIControlStateNormal]; | |
| 137 | + [_editorBtn setImage:[UIImage imageNamed:@"editor_selected"] forState:UIControlStateSelected]; | |
| 137 | 138 | _editorBtn.selected = YES; |
| 138 | 139 | } |
| 139 | 140 | return _editorBtn; | ... | ... |
LiveVideoCloud/Classes/Sections/Mine/Views/LVCPreviewView.m
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | #pragma mark - |
| 38 | 38 | #pragma mark - Action |
| 39 | 39 | - (void)onClick:(UIButton *)sender |
| 40 | -{ | |
| 40 | +{ | |
| 41 | 41 | if (self.onEvent){ |
| 42 | 42 | self.onEvent(sender.tag, 0); |
| 43 | 43 | } |
| ... | ... | @@ -101,7 +101,7 @@ |
| 101 | 101 | - (UIButton *)closeBtn |
| 102 | 102 | { |
| 103 | 103 | if (!_closeBtn){ |
| 104 | - _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 104 | + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 105 | 105 | _closeBtn.frame = CGRectMake(15, 18, TOP_ICON_WIDTH, TOP_ICON_WIDTH); |
| 106 | 106 | _closeBtn.tag = PreViewSubViewIdx_Close; |
| 107 | 107 | [_closeBtn addTarget:self action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside]; |
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | - (UIButton *)beautyBtn |
| 114 | 114 | { |
| 115 | 115 | if (!_beautyBtn){ |
| 116 | - _beautyBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 116 | + _beautyBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 117 | 117 | _beautyBtn.frame = CGRectMake(self.closeBtn.right+SPACE, 18, TOP_ICON_WIDTH, TOP_ICON_WIDTH); |
| 118 | 118 | _beautyBtn.tag = PreViewSubViewIdx_Beauty; |
| 119 | 119 | [_beautyBtn addTarget:self action:@selector(beautyBtnClick:) forControlEvents:UIControlEventTouchUpInside]; |
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | - (UIButton *)flashBtn |
| 126 | 126 | { |
| 127 | 127 | if (!_flashBtn){ |
| 128 | - _flashBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 128 | + _flashBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 129 | 129 | _flashBtn.frame = CGRectMake(self.beautyBtn.right+SPACE, 18, TOP_ICON_WIDTH, TOP_ICON_WIDTH); |
| 130 | 130 | _flashBtn.tag = PreViewSubViewIdx_Flash; |
| 131 | 131 | [_flashBtn addTarget:self action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside]; |
| ... | ... | @@ -150,7 +150,7 @@ |
| 150 | 150 | - (UIButton *)funcBtn |
| 151 | 151 | { |
| 152 | 152 | if (!_funcBtn){ |
| 153 | - _funcBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 153 | + _funcBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 154 | 154 | _funcBtn.frame = CGRectMake(self.toggleCameraBtn.right+SPACE, 18, TOP_ICON_WIDTH, TOP_ICON_WIDTH); |
| 155 | 155 | _funcBtn.tag = PreViewSubViewIdx_Function; |
| 156 | 156 | [_funcBtn addTarget:self action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside]; | ... | ... |
LiveVideoCloud/UtilKits/Category/UIColor+HexString.m
LiveVideoCloud/animation.xcassets/ShortVideo/ more selected.imageset/ more selected.png deleted
100644 → 0
5 KB
LiveVideoCloud/animation.xcassets/ShortVideo/editor selected.imageset/editor selected.png deleted
100644 → 0
2.32 KB
LiveVideoCloud/animation.xcassets/ShortVideo/ more selected.imageset/Contents.json renamed to LiveVideoCloud/animation.xcassets/ShortVideo/editor_selected.imageset/Contents.json
LiveVideoCloud/animation.xcassets/ShortVideo/editor_selected.imageset/editor_selected.png
0 → 100644
606 Bytes
LiveVideoCloud/animation.xcassets/ShortVideo/filter normal.imageset/filter normal.png deleted
100644 → 0
7.01 KB
LiveVideoCloud/animation.xcassets/ShortVideo/filter selected.imageset/filter selected.png deleted
100644 → 0
7.28 KB
LiveVideoCloud/animation.xcassets/ShortVideo/editor selected.imageset/Contents.json renamed to LiveVideoCloud/animation.xcassets/ShortVideo/filter_normal.imageset/Contents.json
LiveVideoCloud/animation.xcassets/ShortVideo/filter_normal.imageset/filter_normal.png
0 → 100644
2.08 KB
LiveVideoCloud/animation.xcassets/ShortVideo/filter normal.imageset/Contents.json renamed to LiveVideoCloud/animation.xcassets/ShortVideo/filter_selected.imageset/Contents.json
LiveVideoCloud/animation.xcassets/ShortVideo/filter_selected.imageset/filter_selected.png
0 → 100644
2.04 KB
LiveVideoCloud/animation.xcassets/ShortVideo/filter selected.imageset/Contents.json renamed to LiveVideoCloud/animation.xcassets/ShortVideo/func_normal.imageset/Contents.json
LiveVideoCloud/animation.xcassets/ShortVideo/func_normal.imageset/func_normal.png
0 → 100644
930 Bytes
LiveVideoCloud/animation.xcassets/ShortVideo/more normal.imageset/Contents.json renamed to LiveVideoCloud/animation.xcassets/ShortVideo/func_selected.imageset/Contents.json
LiveVideoCloud/animation.xcassets/ShortVideo/func_selected.imageset/func_selected.png
0 → 100644
886 Bytes
LiveVideoCloud/animation.xcassets/ShortVideo/more normal.imageset/more normal.png deleted
100644 → 0
4.89 KB