Browse Source

功能优化

Steven 8 months ago
parent
commit
f1a143440f

+ 2 - 2
KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme

@@ -51,7 +51,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "DEV"
+      buildConfiguration = "TEST"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
@@ -92,7 +92,7 @@
       buildConfiguration = "Debug">
    </AnalyzeAction>
    <ArchiveAction
-      buildConfiguration = "DEV"
+      buildConfiguration = "TEST"
       revealArchiveInOrganizer = "YES">
    </ArchiveAction>
 </Scheme>

+ 12 - 17
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSAccompanyWebViewController.m

@@ -16,7 +16,6 @@
 #import <CloudAccompanyLibrary/KSVideoRecordManager.h>  // 视频录制
 #import <CloudAccompanyLibrary/KSCloudBeatView.h>      // 节拍器
 #import <KSToolLibrary/MidiPlayerEngine.h>      // midi 播放
-//#import <CloudAccompanyLibrary/kSNewPlayer.h>          // mp3 播放器
 
 #import "AccompanyLoadingView.h"
 
@@ -24,7 +23,7 @@
 
 // 合成
 #import <KSToolLibrary/KSMediaEditor.h>
-#import "KSMediaMergeView.h"
+#import "KSAccompanyDraftViewController.h"
 #import "KSLogManager.h"
 
 #import "AudioEnginePlayer.h"
@@ -660,39 +659,35 @@
             }
             // 音视频合成
             else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openAdjustRecording"]) {
-                KSMediaMergeView *mergeView = [[KSMediaMergeView alloc] init];
+                KSAccompanyDraftViewController *ctrl = [[KSAccompanyDraftViewController alloc] init];
+                ctrl.ks_landScape = YES;
+                
                 if (self.bgAudioUrl == nil) {
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"当前曲目无mp3伴奏"];
                 }
                 else {
                     if (self.AQManager && self.AQManager.audioUrl) {
-                        if (self->_videoRecordManager) {
-                            [self.videoRecordManager removeDisplay];
-                        }
                         self.recordUrl = self.AQManager.audioUrl;
-                        [self.view addSubview:mergeView];
-                        [mergeView mas_makeConstraints:^(MASConstraintMaker *make) {
-                            make.left.right.top.bottom.mas_equalTo(self.view);
-                        }];
+                        
                         NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
-                        mergeView.recordId = [content ks_stringValueForKey:@"recordId"];
-                        mergeView.songName = [content ks_stringValueForKey:@"title"];
-                        mergeView.coverImage = [content ks_stringValueForKey:@"coverImg"];
+                        ctrl.recordId = [content ks_stringValueForKey:@"recordId"];
+                        ctrl.songName = [content ks_stringValueForKey:@"title"];
+                        ctrl.coverImage = [content ks_stringValueForKey:@"coverImg"];
                         if ([[content allKeys] containsObject:@"speedRate"]) {
-                            mergeView.musicSpeed = [content ks_floatValueForKey:@"speedRate"];
+                            ctrl.musicSpeed = [content ks_floatValueForKey:@"speedRate"];
                         }
                         else {
-                            mergeView.musicSpeed = 1.0f;
+                            ctrl.musicSpeed = 1.0f;
                         }
                         MJWeakSelf;
                         NSInteger micDelay = [UserDefaultObjectForKey(@"micDelay") integerValue];
                         NSInteger defaultDelay = self.offsetTime + micDelay;
-                        [mergeView configWithVideoUrl:self.videoRecordManager.videoFileURL bgAudioUrl:self.bgAudioUrl remoteBgUrl:self.accompanyUrl  recordUrl:self.recordUrl offsetTime:defaultDelay mergeCallback:^(BOOL isPublished) {
-                            [weakSelf appEnterForeground];
+                        [ctrl configWithVideoUrl:self.videoRecordManager.videoFileURL bgAudioUrl:self.bgAudioUrl remoteBgUrl:self.accompanyUrl  recordUrl:self.recordUrl offsetTime:defaultDelay mergeCallback:^(BOOL isPublished) {
                             if (isPublished) {
                                 [weakSelf musicPublishCallBack:content];
                             }
                         }];
+                        [self.navigationController pushViewController:ctrl animated:NO];
                     }
                     else {
                         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"麦克风被占用"];

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/NavigationController/CustomNavViewController.m

@@ -93,7 +93,7 @@
 #pragma mark - UINavigationControllerDelegate
 
 - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
-    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)] && ![viewController isKindOfClass:NSClassFromString(@"KSBaseWKWebViewController")] && ![viewController isKindOfClass:NSClassFromString(@"FirstSettingViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXLiveRoomViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXClassroomViewController")]) {
+    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)] && ![viewController isKindOfClass:NSClassFromString(@"KSBaseWKWebViewController")] && ![viewController isKindOfClass:NSClassFromString(@"FirstSettingViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXLiveRoomViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXClassroomViewController")] && ![viewController isKindOfClass:NSClassFromString(@"KSAccompanyDraftViewController")]) {
         self.interactivePopGestureRecognizer.enabled = YES;
     }
 }