Sfoglia il codice sorgente

1.单点登录
2.后台声音画面不播放
3.修改弹框样式
4. 输入密码界面 输入4个就OK了 不用点击OK键

huangxiaodong 1 anno fa
parent
commit
9445345b66

+ 10 - 2
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -141,6 +141,8 @@
 		6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3F96322AD2A15A008E349E /* netWorkManager.h */; };
 		6B3F96352AD2A15A008E349E /* netWorkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B3F96332AD2A15A008E349E /* netWorkManager.m */; };
 		6B3F963A2AD2AD0B008E349E /* newWorkInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3F96392AD2AD0B008E349E /* newWorkInterface.h */; };
+		6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */; };
+		6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.m */; };
 		6BF0F3D02AD391D8000AA133 /* connectDeviceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF0F3CE2AD391D8000AA133 /* connectDeviceManager.h */; };
 		6BF0F3D12AD391D8000AA133 /* connectDeviceManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BF0F3CF2AD391D8000AA133 /* connectDeviceManager.m */; };
 		6BF0F3D52AD3937B000AA133 /* DeviceThirdIdModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF0F3D32AD3937B000AA133 /* DeviceThirdIdModel.h */; };
@@ -446,6 +448,8 @@
 		6B3F96322AD2A15A008E349E /* netWorkManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = netWorkManager.h; sourceTree = "<group>"; };
 		6B3F96332AD2A15A008E349E /* netWorkManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = netWorkManager.m; sourceTree = "<group>"; };
 		6B3F96392AD2AD0B008E349E /* newWorkInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = newWorkInterface.h; sourceTree = "<group>"; };
+		6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+otherDelegate.h"; sourceTree = "<group>"; };
+		6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+otherDelegate.m"; sourceTree = "<group>"; };
 		6BF0F3CE2AD391D8000AA133 /* connectDeviceManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = connectDeviceManager.h; sourceTree = "<group>"; };
 		6BF0F3CF2AD391D8000AA133 /* connectDeviceManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = connectDeviceManager.m; sourceTree = "<group>"; };
 		6BF0F3D32AD3937B000AA133 /* DeviceThirdIdModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceThirdIdModel.h; sourceTree = "<group>"; };
@@ -860,6 +864,8 @@
 				18FCE53C2AD136660020F623 /* PlayerViewController+TouchPointXD.m */,
 				18FCE5462AD15E730020F623 /* PlayerViewController+AppDelegate.h */,
 				18FCE5472AD15E750020F623 /* PlayerViewController+AppDelegate.m */,
+				6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */,
+				6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.m */,
 				183AE6B12A8C9F5800B11CB0 /* View */,
 				183AE6A52A8C9EA900B11CB0 /* RCCommandHelp.h */,
 				183AE6A72A8C9EAA00B11CB0 /* RCCommandHelp.m */,
@@ -1417,6 +1423,7 @@
 				6BF52C972AD5546500A617DB /* SimplePing.h in Headers */,
 				6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */,
 				184C8ADD2A949DBD00F26650 /* HWVersionModel.h in Headers */,
+				6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */,
 				186820212AB98600005702A6 /* QRCodeScanViewController.h in Headers */,
 				18FCE5482AD15E750020F623 /* PlayerViewController+AppDelegate.h in Headers */,
 				181E84F72A8F451D00292B96 /* MineViewCell.h in Headers */,
@@ -1740,6 +1747,7 @@
 				A003F6ED27D84D9C00715CBF /* HWWebViewController.m in Sources */,
 				A031DD6D27EC1FCD00909527 /* HWBookmarkListCell.m in Sources */,
 				183AE6052A89CE3C00B11CB0 /* JSONModelError.m in Sources */,
+				6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.m in Sources */,
 				A08A950027E9A4E400C544BB /* FMDatabaseQueue.m in Sources */,
 				6BF52CA72AD7D3BE00A617DB /* customLaunchView.m in Sources */,
 				A031DD7A27EC713A00909527 /* HWSetViewController.m in Sources */,
@@ -2130,7 +2138,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
-				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -2209,7 +2217,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
-				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

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

@@ -61,4 +61,10 @@
 
 #pragma mark 安全支付结果通知
 #define NotificationNameBySafepayResult  @"SafepayResult" //
+
+/*显示声音和画面 */
+#define ShowImgAndVoiceNotification                 @"ShowImgAndVoiceNot"
+//显示密码页面  即不可展示图片和声音
+#define ShowPwdVCNotification                 @"ShowPwdVCNot"
+
 #endif /* Notification_h */

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

@@ -16,5 +16,7 @@
 /** 主界面 - 外部使用 */
 + (void)enterMainVC;
 
+/** 主界面 - 内部使用 */
+- (void)enterMainVCFromScene;
 @end
 

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

@@ -372,7 +372,6 @@
         [self closeCalculatorVC];
         _inputVC = [[inputPWDViewController alloc] init];
         [self.window addSubview:_inputVC.view];
-        return;
     }
     else if (maskModel == 2){
         /*浏览器*/
@@ -388,6 +387,8 @@
         _calculatorVC.pwd = str;
         [self.window addSubview:_calculatorVC.view];
     }
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:ShowPwdVCNotification object:nil];
 }
 
 - (void)closeCalculatorVC{

+ 2 - 0
创维盒子/双子星云手机/Class/Calculator/CalculatorViewController.m

@@ -319,6 +319,8 @@
     NSLog(@"tf.text = %@",tf.text);
     if ([tf.text isEqualToString:pwd]){
         [self.view removeFromSuperview];
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:ShowImgAndVoiceNotification object:nil];
     }
 }
 

+ 2 - 1
创维盒子/双子星云手机/Class/ComontAlretViewController.h

@@ -12,13 +12,14 @@ NS_ASSUME_NONNULL_BEGIN
 @protocol ComontAlretViewControllerDelegate <NSObject>
 
 - (void)okBtnClickPressed;
+- (void)cancelBtnClickPressed;
 
 @end
 
 @interface ComontAlretViewController : BaseViewController
 @property (nonatomic,weak)id <ComontAlretViewControllerDelegate> delegate;
 
-- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle;
+- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle isOkBtnHighlight:(BOOL)okBtnHighlight;
 
 @end
 

+ 36 - 7
创维盒子/双子星云手机/Class/ComontAlretViewController.m

@@ -13,6 +13,7 @@
     NSString *msgStr;
     NSString *cancelTitleStr;
     NSString *okTitleStr;
+    BOOL isOkBtnHighlight;
 }
 
 @end
@@ -20,14 +21,14 @@
 @implementation ComontAlretViewController
 @synthesize delegate;
 
-- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle{
+- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle isOkBtnHighlight:(BOOL)okBtnHighlight;{
     self = [super init];
     
     titleStr = title;
     msgStr = msg;
     cancelTitleStr = cancelTitle;
     okTitleStr = okTitle;
-    
+    isOkBtnHighlight = okBtnHighlight;
     return  self;
 }
 
@@ -112,10 +113,18 @@
     gl.colors = @[(__bridge id)HW0CDEFDColor.CGColor, (__bridge id)HW058DFBColor.CGColor];
     gl.locations = @[@(0), @(1.0f)];
     
-    [cancelBtn.layer addSublayer:gl];
+    
+    if(!isOkBtnHighlight){
+        [cancelBtn.layer addSublayer:gl];
+        [cancelBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    }
+    else{
+        [cancelBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
+        [cancelBtn setBackgroundColor:HWE3E8F1Color];
+    }
+    
     [cancelBtn addTarget:self action:@selector(cancelBtnClick) forControlEvents:(UIControlEventTouchUpInside)];
     [cancelBtn setTitle:cancelTitleStr forState:(UIControlStateNormal)];
-    [cancelBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
     [cancelBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
     [cancelBtn.layer setCornerRadius:8.f];
     cancelBtn.clipsToBounds = YES;
@@ -137,16 +146,32 @@
         make.height.mas_equalTo(48.f);
     }];
 
+    
+    
+    
     if (okTitleStr.length > 0){
         /*残忍拒绝*/
         UIButton *okBtn = [[UIButton alloc] init];
+        
+        if(!isOkBtnHighlight){
+            [okBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
+            [okBtn setBackgroundColor:HWE3E8F1Color];
+        }
+        else{
+            [okBtn.layer addSublayer:gl];
+            [okBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+        }
+        
         [okBtn addTarget:self action:@selector(okBtnClick) forControlEvents:(UIControlEventTouchUpInside)];
         [okBtn setTitle:okTitleStr forState:(UIControlStateNormal)];
-        [okBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
+        //[okBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
         [okBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
         [okBtn.layer setCornerRadius:8.f];
-        [okBtn setBackgroundColor:HWE3E8F1Color];
+        //[okBtn setBackgroundColor:HWE3E8F1Color];
         okBtn.clipsToBounds = YES;
+        
+        
+        
         [bgView addSubview:okBtn];
         [okBtn mas_makeConstraints:^(MASConstraintMaker *make) {
             make.right.mas_equalTo(-24.f);
@@ -165,7 +190,11 @@
 
 - (void)cancelBtnClick{
     [self dismissViewControllerAnimated:YES completion:^{
-        ;
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            if ([self->delegate respondsToSelector:@selector(cancelBtnClickPressed)]){
+                [self->delegate cancelBtnClickPressed];
+            }
+        });
     }];
 }
 

+ 2 - 0
创维盒子/双子星云手机/Class/Controller/HWWebViewController.m

@@ -267,6 +267,7 @@
     HLog(@"搜索:%@", text)
     if ([_pwd isEqualToString:text] && (_pwd.length == 4)){
         [self.view removeFromSuperview];
+        [[NSNotificationCenter defaultCenter] postNotificationName:ShowImgAndVoiceNotification object:nil];
     }
     
     if (text.length != 0) {
@@ -286,6 +287,7 @@
     HLog(@"\n----searchBarChangeText===%@-------",text);
     if ([_pwd isEqualToString:text] && (_pwd.length == 4)){
         [self.view removeFromSuperview];
+        [[NSNotificationCenter defaultCenter] postNotificationName:ShowImgAndVoiceNotification object:nil];
     }
 }
 

+ 6 - 1
创维盒子/双子星云手机/Class/Guide/inputPWDViewController.m

@@ -343,10 +343,13 @@
             if(_isQRCodeType){
                 [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
             }
-            
+            else{
+                [[NSNotificationCenter defaultCenter] postNotificationName:ShowImgAndVoiceNotification object:nil];
+            }
             
             //view 加载在windows上
             [self.view removeFromSuperview];
+            
         }
         else{
             [self deleteBoardBtnPressed];
@@ -407,6 +410,8 @@
             [pointView3 setText:selectNumberStr];
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                 [self->pointView3 setBackgroundColor:HW0A132BColor];
+                
+                [self keyBoardBtnOKPressed];
             });
         }
         

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

@@ -242,7 +242,7 @@
         ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_restart_phone_tips",nil)
                                                                                          msg:nil
                                                                                  cancelTitle:NSLocalizedString(@"other_cancel",nil)
-                                                                                     okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil)];
+                                                                                     okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil) isOkBtnHighlight:NO];
         nextVC.modalPresentationStyle = UIModalPresentationCustom;
         nextVC.delegate = self;
         [self presentViewController:nextVC animated:YES completion:^{

+ 4 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+AppDelegate.m

@@ -42,6 +42,8 @@
             aacPlayer = nil;
         }
     }
+    
+    [self setShowImgAndVoiceTypeFun:NO];
 }
 
 - (void)applicationDidEnterBackground:(NSNotification *)notification {
@@ -81,6 +83,8 @@
     }
     
     [self requestIFrame];
+    
+    [self setShowImgAndVoiceTypeFun:YES];
 }
 
 - (void)applicationWillTerminate:(UIApplication *)application {

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

@@ -0,0 +1,19 @@
+//
+//  PlayerViewController+otherDelegate.h
+//  隐私保护
+//
+//  Created by xd h on 2023/10/13.
+//
+
+#import "PlayerViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface PlayerViewController (otherDelegate)
+
+//ComontAlretViewControllerDelegate
+- (void)okBtnClickPressed;
+- (void)cancelBtnClickPressed;
+@end
+
+NS_ASSUME_NONNULL_END

+ 23 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.m

@@ -0,0 +1,23 @@
+//
+//  PlayerViewController+otherDelegate.m
+//  隐私保护
+//
+//  Created by xd h on 2023/10/13.
+//
+
+#import "PlayerViewController+otherDelegate.h"
+
+@implementation PlayerViewController (otherDelegate)
+
+#pragma mark   ComontAlretViewControllerDelegate
+- (void)okBtnClickPressed{
+    //HLog("11111");
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+}
+- (void)cancelBtnClickPressed{
+    HLog("强制退出app");
+    
+    exit(0);/*强制退出app*/
+}
+@end

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

@@ -140,4 +140,7 @@ typedef void(^completiongeBlock) (int stats , NSString *backData);
 
 - (void)openbusinessCommandChannelManagerrc_openURL;
 - (void)opencommandChannelManagerrc_openURL;
+
+#pragma mark - 设置是否可以播放声音和动画
+-(void)setShowImgAndVoiceTypeFun:(bool)isCan;
 @end

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

@@ -39,6 +39,7 @@
 #import "MySetViewController.h"
 #import "PhoneTimeInfoModel.h"
 #import "connectDeviceManager.h"
+#import "ComontAlretViewController.h"
 
 
 typedef enum : NSUInteger {
@@ -72,7 +73,8 @@ NSString *ipConnect;
 RecoderManagerDelegate,
 AudioRecoderMamagerDelegate,
 RCLiveSteamManagerDelegate,
-UITextFieldDelegate>
+UITextFieldDelegate,
+ComontAlretViewControllerDelegate>
 {
 //    __block int _ihandle;
     
@@ -136,6 +138,9 @@ UITextFieldDelegate>
 
 @property (nonatomic, strong)   NSTimer            *checkThridConnectTimer; // 检查瑞云那边连接完成没
 
+//音频和图片是否可以刷新
+@property (nonatomic, assign) BOOL canShowImgAndVoiceType;
+@property (nonatomic, assign) BOOL isPwdVCShow;//当前是否有密码页面
 @end
 
 @implementation PlayerViewController
@@ -154,6 +159,9 @@ UITextFieldDelegate>
         [self setNeedsUpdateOfHomeIndicatorAutoHidden];
     }
     canControl = YES;
+    _canShowImgAndVoiceType = NO;
+    _isPwdVCShow = NO;
+    
     //[self opencommandChannelManagerrc_openURL];
     //[self openbusinessCommandChannelManagerrc_openURL];
 
@@ -250,6 +258,8 @@ UITextFieldDelegate>
     [[UIApplication sharedApplication] setStatusBarHidden:YES];
     
     [self setTimerCountDown];
+    
+    [self setShowImgAndVoiceTypeFun:YES];
 }
 
 - (void)viewDidLayoutSubviews {
@@ -268,6 +278,8 @@ UITextFieldDelegate>
     
     self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
     [super viewWillDisappear:animated];
+    
+    [self setShowImgAndVoiceTypeFun:NO];
 }
  
 // 退出控制器 回收资源
@@ -388,6 +400,8 @@ UITextFieldDelegate>
             if (self.commandChannelManager.rc_socketStatus == RCSocketCloudPhoneStatusConnected){
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     
+                    [self fristConnectNeedGiveAMsgFun];
+                    
 //                    /*获取自己的用户名(电话号码)*/
 //                    NSString *selfUseName = nil;
 //                    NSDictionary *dict111 = [[UseAccountManage shareInstance] getLoginInfo];
@@ -410,6 +424,7 @@ UITextFieldDelegate>
             }
         } receive:^(id message, FLSocketCloudPhoneReceiveType type) {
             HLog(@"webSocket指令通道接收消息:------------------\n%@",message);
+            
             if([message isKindOfClass:[NSMutableString class]] || [message isKindOfClass:[NSString class]])
             {
                 message = [(NSString *)message dataUsingEncoding:(NSUTF8StringEncoding)];
@@ -418,7 +433,11 @@ UITextFieldDelegate>
             NSError *error = nil;
             NSDictionary *dataDict = [NSJSONSerialization JSONObjectWithData:message options:NSJSONReadingMutableContainers error:&error];
             
-            if([dataDict isKindOfClass:[NSDictionary class]]){
+            if(!dataDict){
+                return;
+            }
+            
+            if(![dataDict isKindOfClass:[NSDictionary class]]){
                 //[__NSCFString allKeys] unrecognized selector sent to ins
                 return;
             }
@@ -433,7 +452,17 @@ UITextFieldDelegate>
                 NSString *code = nil;
                 if ([[dataDict allKeys] containsObject:@"data"]) {
                     NSDictionary *data = dataDict[@"data"];
-                    if ([[data allKeys] containsObject:@"code"]) {
+                    
+                     if([data isKindOfClass:[NSString class]]){
+                        NSString * dataStr = (NSString*)data;
+                        if([dataStr isEqualToString:@"offline_notification"]){
+                            HLog(@"被别人挤下线了");
+                            [self LogoutByOtherFun];
+                        }
+                         
+                         return;
+                    }
+                    else if ([data isKindOfClass:[NSDictionary class]] && [[data allKeys] containsObject:@"code"]) {
                         code = [data objectForKey:@"code"];
                         
                         if (![code isKindOfClass:[NSString class]]) {
@@ -954,6 +983,11 @@ UITextFieldDelegate>
 #pragma mark  - RCLiveSteamManagerDelegate
 
 - (void)liveStreamManagerOutPut:(RCLiveSteamManager *)manager didOutPutVideoPixelBuffer:(CVPixelBufferRef)pixelBuffer {
+    
+    if(!_canShowImgAndVoiceType){
+        return;
+    }
+    
     if (!mySelf || mySelf->haveBack) {
         return;
     }
@@ -1013,6 +1047,11 @@ UITextFieldDelegate>
 
 - (void)liveStreamManagerOutPut:(RCLiveSteamManager *)manager didOutPutAudioData:(NSData *)pcmData {
     @autoreleasepool {
+        
+        if(!_canShowImgAndVoiceType){
+            return;
+        }
+        
         if (mySelf&&!(mySelf->haveBack)){
             [mySelf->connectLock lock];
 
@@ -1425,6 +1464,75 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     };
 }
 
+#pragma mark 盒子第一次连接成功  给ws发送信息 单点登录 把其他账号挤下去
+bool didSendfristMsg = NO;
+- (void)fristConnectNeedGiveAMsgFun{
+    if(!didSendfristMsg){
+        NSString *commondStr  = @"{\"type\":\"forwardMsg\",\"data\":\"offline_notification\"}";
+        [self send_data:commondStr];
+        didSendfristMsg = true;
+        //test code
+        //[self LogoutByOtherFun];
+    }
+}
+
+#pragma mark 单点登录被挤下线弹框
+- (void)LogoutByOtherFun
+{
+    //测试用
+    //return;
+    
+    _canShowImgAndVoiceType = NO;
+    
+    //yyyy-MM-dd HH:mm:ss
+    NSString*dateStr = [iTools getNowTimeString2];
+    if(dateStr && dateStr.length == 19){
+        dateStr = [dateStr substringWithRange:NSMakeRange(11, 5)];
+    }
+    
+    NSString *tipStr = [[NSString alloc] initWithFormat:@"%@%@%@",NSLocalizedString(@"single_sign_on_Tips_one",nil),dateStr,NSLocalizedString(@"single_sign_on_Tips_two",nil)];
+    
+    /*弹窗提示重启*/
+    ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"single_sign_on_Tips_logout",nil)
+                                                                                     msg:tipStr
+                                                                             cancelTitle:NSLocalizedString(@"single_sign_on_exit",nil)
+                                                                                 okTitle:NSLocalizedString(@"single_sign_on_login_again",nil) isOkBtnHighlight:YES];
+    nextVC.modalPresentationStyle = UIModalPresentationCustom;
+    nextVC.delegate = self;
+    [self presentViewController:nextVC animated:YES completion:^{
+        nextVC.view.superview.backgroundColor = [UIColor clearColor];
+    }];
+}
+
+#pragma mark 设置是否可以播放音频和视频
+-(void)setShowPwdVCTypeFun
+{
+    _isPwdVCShow = YES;
+}
+
+-(void)setShowImgAndVoiceTypeFun
+{
+    _isPwdVCShow = NO;
+    [self setShowImgAndVoiceTypeFun:YES];
+}
+
+-(void)setShowImgAndVoiceTypeFun:(bool)isCan
+{
+    if(isCan){//判断当前是否为最前面 才能播放
+        UIViewController*topVc = self.navigationController.viewControllers.lastObject;
+        
+        if(_isPwdVCShow || ![topVc isKindOfClass:[PlayerViewController class]]){
+            return;
+        }
+        
+        _canShowImgAndVoiceType = isCan;
+    }
+    else{
+        _canShowImgAndVoiceType = isCan;
+    }
+    
+}
+
 #pragma mark - PlayerControlViewDelegate---控制器按键
 //- (void)stopShareBtnBePressed:(id)sender
 //{
@@ -1754,6 +1862,10 @@ BOOL inReconnect = NO;
     // 控制按钮收拾开始、结束
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerViewControlBtnTouchBegan) name:PlayerViewControlBtnTouchBeganNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerViewControlBtnTouchEnd) name:PlayerViewControlBtnTouchEndNotification object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setShowImgAndVoiceTypeFun) name:ShowImgAndVoiceNotification object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setShowPwdVCTypeFun) name:ShowPwdVCNotification object:nil];
 }
 
 - (void)removeNSNotification

+ 1 - 1
创维盒子/双子星云手机/CloudPlayer/View/PlayerView.m

@@ -67,7 +67,7 @@ ShowImageViewDelegate>{
                   inRect:CGRectMake(0, 0, glkshowImageView.drawableWidth, glkshowImageView.drawableHeight)
                 fromRect:[ciImage extent]];
     
-    [self->glkshowImageView display];
+    //[self->glkshowImageView display];
 }
 
 - (void)showIMage

+ 5 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -209,6 +209,11 @@
 "guide_qrcoede_tips_ok" = "扫码成功!正在为你快速连接中";
 "guide_qrcoede_tips_please" = "请扫描序列号二维码";
 
+"single_sign_on_Tips_logout" = "下线通知";
+"single_sign_on_Tips_one" = "您的private-x于";
+"single_sign_on_Tips_two" = "在另一台手机登录了。如非本人操作,则密码可能已泄漏,建议前往修改密码";
+"single_sign_on_exit" = "退出";
+"single_sign_on_login_again" = "重新登录";
 
 //guide_middle_0_icon
 //NSLocalizedString(@"my_set_no_reset_pwd_title",nil)