Browse Source

上传视频过程中切换其他设备,再切回来,进入上传记录将暂停的视频点击“”全部开启“”按钮,出现进度条闪烁

huangxiaodong 1 year ago
parent
commit
fe18d9c169

+ 15 - 0
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -204,7 +204,22 @@
     
     if(_curPlayerVC){
         [_curPlayerVC disconnectVideoServer];
+        
         [_curPlayerVC recyclResource];
+        ///
+        [_curPlayerVC toStopRecoder];
+        [_curPlayerVC toStopAudioRecoder];
+
+        [_curPlayerVC removeNSNotification];
+        
+        //清空WebSocket连接
+        [_curPlayerVC.commandChannelManager rc_close];
+        
+//        globalBlock(^{
+//            [self->_curPlayerVC.liveStreamManager rc_release];
+//        });
+        /////////
+        
         _curPlayerVC = nil;
     }
     

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.m

@@ -249,7 +249,7 @@
             NSTimeInterval  timers = curUploadFileDataModel.curTimeInterval - curUploadFileDataModel.preTimeInterval;
             
             if(timers > 0){
-                long speed= 5*1024*1024 / timers;
+                long speed= 1*1024*1024 / timers;
                 NSString * speedStr = nil;
                 NSInteger speed_k = speed / (1024);
                 if(speed_k < 1024){

+ 7 - 2
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -162,6 +162,11 @@
     
     uploadFileDataModel *uploadFileDataMod = [notification object];
     //HLog(@"%@",uploadFileDataMod);
+    
+    if(self.curUploadFileDataMod && uploadFileDataMod.bg_id.integerValue == self.curUploadFileDataMod.bg_id.integerValue){
+        return;
+    }
+    
     self.curUploadFileDataMod = uploadFileDataMod;
     
     if(![uploadFileDataMod isKindOfClass:[uploadFileDataMod class]]){
@@ -407,7 +412,7 @@
 #pragma mark 申请上传文件
 - (void)ApplyUploadFileFun
 {
-    if(!self.taskUid){
+    //if(!self.taskUid){
         self.taskUid = [iTools getTaskUidStr];
         self.fileName = self.curUploadFileDataMod.filename;
         if(self.curUploadFileDataMod.curUploadFileType == uploadFileTypeVideo){
@@ -421,7 +426,7 @@
         
         //HLog(@"%@  %@",self.taskUid,self.fileName);
         //self.cutFileDataArr = [self fileCutPartsBy:self.AllFileData];
-    }
+    //}
     
     NSString * commandStr = [RCCommandHelp applyForUploadFileBy:self.taskUid  filePath:self.fileName];
     [self.commandChannelManager rc_sendData:commandStr];

+ 5 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h

@@ -15,6 +15,10 @@
 #import "Const.h"
 #import "playerShowSecretkeyView.h"
 #import "uploadFileDataModel.h"
+#import <RCCloudPhoneSDK/RCAudioPlayer.h>
+#import <RCCloudPhoneSDK/RCRecordManager.h>
+//#import <RCCloudPhoneSDK/RCCommandChannel.h>
+#import <RCCloudPhoneSDK/RCLiveSteamManager.h>
 
 @protocol PlayerViewControllerDelegate <NSObject>
 
@@ -64,6 +68,7 @@
 */
 @property (nonatomic, copy) NSString *internetHttp;
 
+@property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
 @property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
 @property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道
 

+ 1 - 1
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -123,7 +123,7 @@ ComontAlretViewControllerDelegate>
 @property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
 @property (nonatomic, strong, nullable) RCAudioRecoderMamager *audioRecoderMamager;
 
-@property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
+//@property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
 //@property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
 //@property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道