人生啊人生 3 тижнів тому
батько
коміт
4140007631
2 змінених файлів з 24 додано та 20 видалено
  1. 9 8
      exe/new_src/index.html
  2. 15 12
      exe/src/main/index.js

+ 9 - 8
exe/new_src/index.html

@@ -3,17 +3,18 @@
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>demo</title>
+    <title>主程序</title>
+    <style>
+        html, body {
+            width: 100%;
+            height: 100%;
+            background-color: #000000;
+        }
+    </style>
 </head>
 <body>
-    <p>Demo</p>
-    <p> <input type="button" value="WebSocket实时通讯案例" onclick="toWebSocketEvent()" /> </p>
     <script>
-
-        function toWebSocketEvent() {
-            window.location.href = 'WebSocket/main.html';
-        }
-
+        window.location.href = "http://127.0.0.1:5173/";
     </script>
 </body>
 </html>

+ 15 - 12
exe/src/main/index.js

@@ -22,17 +22,20 @@ var CommonVar = require('../common/moudles/CommonVar.js');
 var os = require('os');
 const axios = require('axios');
 
-// 有用 共享内存
-app.commandLine.appendSwitch('enable-features','SharedArrayBuffer');
-// 滑动更流畅
-app.commandLine.appendSwitch('enable-gpu-rasterization');   
-// 快速 UDP 互联网连接
-app.commandLine.appendSwitch('enable-quic');
-app.commandLine.appendSwitch('enable-zero-copy');
-// 有用
-app.commandLine.appendSwitch('enable-features', "Vulkan");
-// 有用
-app.commandLine.appendSwitch('enable-unsafe-webgpu');
+// 如果出现 html video 无法正常播放,会出现闪烁问题,把这些配置项给关闭,因为有的电脑对webpug兼容不是太好
+// // 有用 共享内存
+// app.commandLine.appendSwitch('enable-features','SharedArrayBuffer');
+// // 滑动更流畅
+// app.commandLine.appendSwitch('enable-gpu-rasterization');   
+// // 快速 UDP 互联网连接
+// app.commandLine.appendSwitch('enable-quic');
+// app.commandLine.appendSwitch('enable-zero-copy');
+// // 有用
+// app.commandLine.appendSwitch('enable-features', "Vulkan");
+// // 有用
+// app.commandLine.appendSwitch('enable-unsafe-webgpu');
+
+
 
 /**
  * 加载窗口,加载完成后,会自动关闭。
@@ -198,7 +201,7 @@ function createMainWindow() {
             enableWebGPU: true,
             // 开启remote模块
             enableRemoteModule : false,
-    
+            
             /**
              * 解决 jq 等引用 其他js 失败的方法
              *