rindy 3 gadi atpakaļ
vecāks
revīzija
81181b24b6
2 mainītis faili ar 5 papildinājumiem un 34 dzēšanām
  1. 4 33
      src/components/RTC/PageRtcLive.vue
  2. 1 1
      vue.config.js

+ 4 - 33
src/components/RTC/PageRtcLive.vue

@@ -237,7 +237,6 @@ let chatAutoScroll = () => {
 };
 
 let createSocket = (config) => {
-  console.log(process.env.VUE_APP_SOCKET_URL, "process.env.VUE_APP_SOCKET_URL");
   var socket = io(process.env.VUE_APP_SOCKET_URL, {
     path: "/ws-sync",
     transports: ["websocket"],
@@ -641,9 +640,9 @@ const startFollow = (app) => {
     if (role.value == "customer") {
       socket.value.emit("action", { type: "ask-currentscene" });
       setTimeout(() => {
-        socket.value.emit("action", { type: "user-init" });  
+        socket.value.emit("action", { type: "user-init" });
       }, 1500);
-      
+
       if (data.user.IsMuted) {
         disableMic.value = true;
         audioMuted.value = true;
@@ -657,7 +656,7 @@ const startFollow = (app) => {
     isJoined.value = true;
 
     setTimeout(() => {
-      isRunRTC.value = true
+      isRunRTC.value = true;
     }, 3000);
 
     user_info.value = data.user;
@@ -813,37 +812,9 @@ const startFollow = (app) => {
     }
   });
 };
-let count = 0;
-let mod = 0;
-let width = 0;
 let onfollowData = (data) => {
   if (isJoined.value) {
-    if (data.type == "rotate") {
-      if (count > 100000) {
-        count = 0;
-      }
-      count++;
-      width = window.innerWidth;
-      if (width < 600) {
-        mod = 6;
-      } else if (width < 1024) {
-        mod = 4;
-      } else if (width < 1433) {
-        mod = 2;
-      } else {
-        mod = 0;
-      }
-      if (mod) {
-        if (count % mod == 0) {
-          console.log(count);
-          socket.value.emit("sync", data);
-        }
-      } else {
-        socket.value.emit("sync", data);
-      }
-    } else {
-      socket.value.emit("sync", data);
-    }
+   socket.value.emit("sync", data);
   }
 };
 

+ 1 - 1
vue.config.js

@@ -11,7 +11,7 @@ module.exports = defineConfig({
   },
   devServer: {
     // port: 443,
-    https: true,
+    https: false,
     // disableHostCheck: true,
     headers: {
       "Cache-Control": "no-store",