Просмотр исходного кода

1.隐私模式)NAS模块进行播放视频时,退出后台进入输入密码界面,视频声音在播放

huangxiaodong 1 год назад
Родитель
Сommit
d6f73c4db8

+ 11 - 10
创维盒子/双子星云手机/Class/Set/previewFile/videoPlayByAVPlayerViewController.m

@@ -62,6 +62,8 @@
     
     //[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDeviceOrientationChange) name:UIDeviceOrientationDidChangeNotification object:nil];
     
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didInputPwdOkFun) name:didInputPWDNotification object:nil];
+    
     _bgView = [[UIView alloc] init];
     [self.view addSubview:_bgView];
     
@@ -136,16 +138,6 @@
         //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe2.mp4";//可以播放
         //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe.m4v";//可以播放
         
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/qisheng.ts";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/wmvTest.wmv";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/复仇者联盟.3gp";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe3.mpeg";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe4.mpg";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe5.rm";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe5.vob";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/gamemkv.mkv";//加载失败
-        //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/j14_yinyue.ogg";//
-        
         //fileUrl = @"http://file.phone.androidscloud.com:8210/document/newFile/download/1/ikIm5C0KjKNvusTF6tIH/LowLevelMultipartUpload_45050149837826456388";//可以播放
         //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/我的视频.mp4";
         
@@ -740,4 +732,13 @@
 }
 
 
+#pragma mark 输入完密码
+- (void)didInputPwdOkFun
+{
+    if([connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode){
+        if(self.player.pauseByEvent){//隐私模式 是
+            self.player.pauseByEvent = NO;
+        }
+    }
+}
 @end

+ 4 - 1
创维盒子/双子星云手机/Vendor/ZFPlayer/Classes/Core/ZFPlayerController.m

@@ -276,7 +276,10 @@ static NSMutableDictionary <NSString* ,NSNumber *> *_zfPlayRecords;
         _notification.didBecomeActive = ^(ZFPlayerNotification * _Nonnull registrar) {
             @zf_strongify(self)
             if (self.isViewControllerDisappear) return;
-            if (self.isPauseByEvent) self.pauseByEvent = NO;
+            //hxd add 20230724
+            if(!ksharedAppDelegate.isDidShowPwdType){
+                if (self.isPauseByEvent) self.pauseByEvent = NO;
+            }
             self.orientationObserver.lockedScreen = NO;
         };
         _notification.oldDeviceUnavailable = ^(ZFPlayerNotification * _Nonnull registrar) {