2 Commity d181bd99a2 ... cd51d68233

Autor SHA1 Wiadomość Data
  huangxiaodong cd51d68233 1.新手引导视频 播放点击返回键无效 闪退问题修复 1 tydzień temu
  huangxiaodong b95b19c2ee 1.新手引导弹框点击立即观看 无响应修复 1 tydzień temu

+ 2 - 2
创维盒子/code/AppDelegate/SceneDelegate.m

@@ -2025,8 +2025,8 @@
         NSInteger selectedIndex = ksharedAppDelegate.mainTabBar.selectedIndex;
         
         if(selectedIndex < curVCArr.count){
-            UIViewController * curVC = curVCArr[selectedIndex];
-            [curVC.navigationController pushViewController:curVC animated:YES];
+            UINavigationController * curNav = curVCArr[selectedIndex];
+            [curNav pushViewController:vc animated:YES];
             
             KWeakSelf
             vc.didClickBackFun = ^{

+ 17 - 1
创维盒子/code/Class/Set/CustomerWebViewController.m

@@ -70,8 +70,24 @@
 
     self.titleLabel.text = titleStr;
     
-    // WKWebView
+    // 初始化配置对象
     WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
+    
+    if (@available(iOS 18.0, *)) {
+        // 系统版本 ≥ 18.0
+        
+        // 默认是NO,这个值决定了用内嵌HTML5播放视频还是用本地的全屏控制
+        config.allowsInlineMediaPlayback = YES;
+        // 自动播放, 不需要用户采取任何手势开启播放
+        // WKAudiovisualMediaTypeNone 音视频的播放不需要用户手势触发, 即为自动播放
+        config.mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone;
+        config.allowsAirPlayForMediaPlayback = YES;
+        config.allowsPictureInPictureMediaPlayback = YES;
+    }
+        
+
+    // WKWebView
+    //WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
     self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) configuration:config];
     // 解决闪白问题
     self.view.backgroundColor = [UIColor whiteColor];