liuzhenxing1118 7 mesi fa
parent
commit
5dba11f1d9

+ 1 - 1
artimenring-iOS/Artimenring/Classes/Data/VideoManager+http.m

@@ -40,7 +40,7 @@
     HDNormalLog(([NSString stringWithFormat:@"VideoManager: requestVideo ticket:%@ dial:%ld", ticket, dial]));
     DeviceModel* model = [[DataManager shared] getDeviceWithTicket:ticket];
     if (dial > 0) {
-        if (model.videoType == VIDEO_TYPE_AGORA) {
+        if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
             [self requestToken:uid ticket:ticket callback:^(BOOL isOK, NSString *token) {
                 if (isOK && token.length > 0) {
                     [self requestVideoEx:uid ticket:ticket token:token dial:dial callback:^(BOOL isOK) {

+ 13 - 13
artimenring-iOS/Artimenring/Classes/Data/VideoManager.m

@@ -48,10 +48,10 @@
 - (void)videoCallIn {
     HDNormalLog(@"VideoManager videoCallIn");
     DeviceModel* model = [[DataManager shared]getDeviceWithTicket:self.mTicket];
-    if (model.videoType == VIDEO_TYPE_JUPHOON) {
+    if (model.videoCallChannel == VIDEO_TYPE_JUPHOON) {
         [self loginJuphoon];
-    } else if (model.videoType == VIDEO_TYPE_AGORA) {
-        [self showInCallVC:model.videoType isCallIn:YES];
+    } else if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
+        [self showInCallVC:model.videoCallChannel isCallIn:YES];
         [self startTimeoutTimer];
     }
 }
@@ -69,9 +69,9 @@
         return;
     self.uid = uid;
     self.mTicket = ticket;
-    self.roomId = model.videoType == VIDEO_TYPE_JUPHOON ? ticket : [self getRoomId:self.uid ticket:self.mTicket];
+    self.roomId = model.videoCallChannel == VIDEO_TYPE_JUPHOON ? ticket : [self getRoomId:self.uid ticket:self.mTicket];
     
-    if (model.videoType == VIDEO_TYPE_JUPHOON) {
+    if (model.videoCallChannel == VIDEO_TYPE_JUPHOON) {
         BOOL isok = [self call:uid ticket:ticket];
         if (!isok) {
             //如果失败,很有可能登录失败,重新登录//
@@ -82,11 +82,11 @@
             }];
             [self startTimeoutTimer];
         }
-    } else if (model.videoType == VIDEO_TYPE_AGORA) {
+    } else if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
         [self requestVideo:uid ticket:ticket dial:1 callback:^(BOOL isOK, NSString *token) {
             if (isOK && token.length > 0) {
                 self.mToken = token;
-                [weak_self showInCallVC:model.videoType isCallIn:NO];
+                [weak_self showInCallVC:model.videoCallChannel isCallIn:NO];
                 [weak_self startTimeoutTimer];
             }
         }];
@@ -96,9 +96,9 @@
 - (void)videoAnswer {
     HDNormalLog(@"VideoManager videoAnswer");
     DeviceModel* model = [[DataManager shared]getDeviceWithTicket:self.mTicket];
-    if (model.videoType == VIDEO_TYPE_JUPHOON) {
+    if (model.videoCallChannel == VIDEO_TYPE_JUPHOON) {
         [self answerJuphoon];
-    } else if (model.videoType == VIDEO_TYPE_AGORA) {
+    } else if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
         [self joinChannel:self.mToken channelId:self.roomId uid:0];
     }
 }
@@ -128,10 +128,10 @@
 
 - (void)term {
     DeviceModel* model = [[DataManager shared] getDeviceWithTicket:self.mTicket];
-    if (model.videoType == VIDEO_TYPE_JUPHOON) {
+    if (model.videoCallChannel == VIDEO_TYPE_JUPHOON) {
         [self termJuphoon];
         [self removeInCallVC];
-    } else if (model.videoType == VIDEO_TYPE_AGORA) {
+    } else if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
         [self termAgora];
         [self removeInCallVC];
     }
@@ -140,9 +140,9 @@
 
 - (void)switchCamera {
     DeviceModel* model = [[DataManager shared] getDeviceWithTicket:self.mTicket];
-    if (model.videoType == VIDEO_TYPE_JUPHOON) {
+    if (model.videoCallChannel == VIDEO_TYPE_JUPHOON) {
         [self switchCameraJuphoon];
-    } else if (model.videoType == VIDEO_TYPE_AGORA) {
+    } else if (model.videoCallChannel == VIDEO_TYPE_AGORA) {
         [self switchCameraAgora];
     }
 }

+ 1 - 1
artimenring-iOS/Artimenring/Classes/Model/EModel.h

@@ -129,7 +129,7 @@ typedef enum : NSUInteger {
 @property(nonatomic, assign) NSInteger startup; //开关机状态
 @property(nonatomic, copy) NSString* version;
 @property(nonatomic, copy) NSString* model;
-@property(nonatomic, assign) VIDEO_TYPE videoType; //选择哪家视频通话
+@property(nonatomic, assign) VIDEO_TYPE videoCallChannel; //选择哪家视频通话
 @property(nonatomic, copy) CloudMatchModel* match;
 - (BOOL)isBind;
 @end

+ 0 - 1
artimenring-iOS/Artimenring/Classes/Model/EModel.m

@@ -259,7 +259,6 @@
     if (self) {
         self.did = -1;
         self.match = [[CloudMatchModel alloc] init];
-        self.videoType = [UserDataHelper getLoginType] == 0 ? VIDEO_TYPE_AGORA : VIDEO_TYPE_JUPHOON;
     }
     return self;
 }

+ 3 - 3
artimenring-iOS/SikeyComm.xcodeproj/project.pbxproj

@@ -3434,7 +3434,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 5;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = YHJXY25X52;
 				ENABLE_BITCODE = NO;
@@ -3499,7 +3499,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 5;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = YHJXY25X52;
 				ENABLE_BITCODE = NO;
@@ -3626,7 +3626,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 5;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = YHJXY25X52;
 				ENABLE_BITCODE = NO;