浏览代码

1.重连保护限制

huangxiaodong 1 年之前
父节点
当前提交
88d82fcac9

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

@@ -88,6 +88,7 @@
 
 /**页面跳转-需不需要回收资源*/
 @property (nonatomic, assign) BOOL               isNeedRecyclResource;
+@property (nonatomic, assign) BOOL               didRecyclResource;
 /**音视频是否连接成功*/
 @property (nonatomic, assign) BOOL               isConnectSuccess;
 

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

@@ -191,6 +191,7 @@ ComontAlretViewControllerDelegate>
     ipConnect   = self->ip;
     
     isLan = NO;
+    _didRecyclResource = NO;
     
     globalBlock(^{
         // 初始化成功后连接
@@ -357,6 +358,8 @@ ComontAlretViewControllerDelegate>
     // 播放器内部页面跳转-不能回收的资源
     if (self.isNeedRecyclResource) {
         
+        self.didRecyclResource = YES;
+        
         // 销毁定时器
         [self cancelTimer];
         
@@ -1200,8 +1203,10 @@ ComontAlretViewControllerDelegate>
             break;
         case 6:{
             mainBlock(^{
-                [self showNewIndicator];
-                [self tryAgain];
+                if(!self.didRecyclResource){
+                    [self showNewIndicator];
+                    [self tryAgain];
+                }
             });
         }
             break;