Ver código fonte

1.镜像升级后记录下连接到的情况 下次连不上也能知道用最新的token

huangxiaodong 11 meses atrás
pai
commit
6aaea673fd

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.h

@@ -184,6 +184,9 @@ UIKIT_EXTERN NSString *const Const_cloudPhone_cur_resolution;
 /*记录当前webrtc的最佳机房(ping时间最短)*/
 UIKIT_EXTERN NSString *const Const_best_webRtc_IPRoom;
 
+/*记录当前镜像版本的tokens是否需要新的*/
+UIKIT_EXTERN NSString *const Const_image_version_for_new_token;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.m

@@ -180,4 +180,7 @@ NSString *const Const_cloudPhone_cur_resolution = @"cloudPhone_cur_resolution";
 
 /*记录当前webrtc的最佳机房(ping时间最短)*/
 NSString *const Const_best_webRtc_IPRoom = @"best_webRtc_IPRoom";
+
+/*记录当前镜像版本的tokens是否需要新的*/
+NSString *const Const_image_version_for_new_token = @"image_version_for_new_token";;
 @end

+ 3 - 0
创维盒子/双子星云手机/webRtc/webRtcManager/webRtcManager.m

@@ -380,12 +380,15 @@
         //判断镜像是否为1.4.4以后
         if(oneStr.integerValue >=2){
             ksharedAppDelegate.isImageFor144Orlater = YES;
+            [HWDataManager setBoolWithKey:Const_image_version_for_new_token value:YES];
         }
         else if(twoStr.integerValue > 4){
             ksharedAppDelegate.isImageFor144Orlater = YES;
+            [HWDataManager setBoolWithKey:Const_image_version_for_new_token value:YES];
         }
         else if(threeStr.integerValue >= 4){
             ksharedAppDelegate.isImageFor144Orlater = YES;
+            [HWDataManager setBoolWithKey:Const_image_version_for_new_token value:YES];
         }
         else{
             ksharedAppDelegate.isImageFor144Orlater = NO;

+ 3 - 1
创维盒子/双子星云手机/webRtc/webRtcPlayerViewController.m

@@ -240,7 +240,9 @@
     [ksharedAppDelegate.WebRtcLogger start];
     
     NSString* curToken = @"vclusters";
-    if(ksharedAppDelegate.isImageFor144Orlater)
+    
+    BOOL isImageFor144Orlater = [HWDataManager getBoolWithKey:Const_image_version_for_new_token];
+    if(isImageFor144Orlater || ksharedAppDelegate.isImageFor144Orlater)
     {
         curToken = @"mediakit";
     }