исрпавь ошибки detector.js:442 Uncaught SecurityError: Failed to read the 'cssRules'…
- User
исрпавь ошибки detector.js:442 Uncaught SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at detector.js:442:59 at detector.js:477:3 (анонимная) @ detector.js:442 (анонимная) @ detector.js:477 VwoQmay:1 is deprecated. Please include iframeConsoleRunner-6d8bf8b4b479137260842506acbb12717dace0823c023e08b96360e60b0840d9.js:1 Error: Could not get an ID from the server. at e. (api.ts:46:10) at s (peerjs.min.js:1:133635) at Object.throw (peerjs.min.js:1:132938) at s (peerjs.min.js:1:132708) вот код
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #c3ec52, #0ba29d); min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; } .chat-container { background-color: #ffffff; width: 100%; max-width: 900px; height: 90vh; border-radius: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; } header { background-color: #4CAF50; color: white; padding: 20px; text-align: center; position: relative; } header h1 { font-size: 1.8rem; } .peer-id { font-size: 0.9rem; margin-top: 5px; opacity: 0.8; word-wrap: break-word; } .main { flex: 1; display: flex; overflow: hidden; } .sidebar { width: 250px; background-color: #f4f4f4; border-right: 1px solid #ddd; padding: 20px; display: flex; flex-direction: column; } .sidebar-section { margin-bottom: 30px; } .sidebar label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; } .sidebar input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; margin-bottom: 10px; transition: border-color 0.3s; } .sidebar input[type="text"]:focus { border-color: #4CAF50; outline: none; } .sidebar button { width: 100%; padding: 10px; background-color: #4CAF50; border: none; border-radius: 6px; color: white; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .sidebar button:hover { background-color: #45a049; } .online-section h3 { margin-bottom: 10px; color: #333; } #online-users { list-style: none; max-height: 300px; overflow-y: auto; } #online-users li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid #ddd; border-radius: 6px; margin-bottom: 5px; background-color: #fff; transition: background-color 0.3s; cursor: pointer; /* Сделать пункт списка кликабельным */ } #online-users li:hover { background-color: #f1f1f1; } #online-users li.active { background-color: #d1e7dd; /* Цвет для активного пользователя */ } .user-info { display: flex; align-items: center; flex: 1; } .user-info .status { width: 10px; height: 10px; border-radius: 50%; background-color: #4CAF50; margin-right: 10px; } .user-info .user-id { font-size: 0.9rem; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; } .user-actions { display: flex; gap: 5px; } .user-actions button { padding: 5px 10px; background-color: #2196F3; border: none; border-radius: 4px; color: white; cursor: pointer; font-size: 0.8rem; transition: background-color 0.3s; } .user-actions button:hover { background-color: #1976D2; } .chat-section { flex: 1; display: flex; flex-direction: column; padding: 20px; background-color: #fafafa; position: relative; } #active-peer { margin-bottom: 10px; font-weight: bold; color: #333; } #messages { flex: 1; overflow-y: auto; padding-right: 10px; margin-bottom: 10px; } .message { margin-bottom: 15px; max-width: 70%; padding: 10px 15px; border-radius: 20px; position: relative; word-wrap: break-word; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .message.self { background-color: #DCF8C6; align-self: flex-end; border-bottom-right-radius: 0; } .message.other { background-color: #FFFFFF; border: 1px solid #ddd; align-self: flex-start; border-bottom-left-radius: 0; } .message.system { background-color: #e0e0e0; text-align: center; max-width: 100%; margin: 10px auto; border-radius: 10px; padding: 8px 12px; font-style: italic; color: #555; } .input-section, .file-section { display: flex; align-items: center; margin-top: 10px; } .input-section input[type="text"], .file-section input[type="file"] { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 6px; margin-right: 10px; transition: border-color 0.3s; } .input-section input[type="text"]:focus, .file-section input[type="file"]:focus { border-color: #4CAF50; outline: none; } .input-section button, .file-section button { padding: 10px 15px; background-color: #4CAF50; border: none; border-radius: 6px; color: white; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .input-section button:hover, .file-section button:hover { background-color: #45a049; } #call-btn, #video-call-btn, #share-screen-btn { margin-top: 15px; background-color: #2196F3; color: white; width: 100%; padding: 10px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } #video-call-btn { background-color: #FF9800; margin-top: 10px; } #share-screen-btn { background-color: #9C27B0; margin-top: 10px; } #call-btn:hover, #video-call-btn:hover, #share-screen-btn:hover { opacity: 0.9; } /* Окно звонка */ .call-window { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #ffffff; padding: 30px; border: 2px solid #4CAF50; border-radius: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.3); display: none; z-index: 1000; width: 350px; text-align: center; } .call-window.active { display: block; } .call-window p { margin-bottom: 20px; font-size: 1rem; color: #333; } .call-window .accept-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; } .call-window .accept-buttons button { width: 100%; padding: 10px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; transition: background-color 0.3s; } .call-window .accept-buttons button.btn-audio { background-color: #4CAF50; color: white; } .call-window .accept-buttons button.btn-audio:hover { background-color: #45a049; } .call-window .accept-buttons button.btn-video { background-color: #FF9800; color: white; } .call-window .accept-buttons button.btn-video:hover { background-color: #F57C00; } .call-window .accept-buttons button.btn-screen { background-color: #9C27B0; color: white; } .call-window .accept-buttons button.btn-screen:hover { background-color: #7B1FA2; } .call-window button.reject { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; background-color: #f44336; color: white; transition: background-color 0.3s; } .call-window button.reject:hover { background-color: #d32f2f; } /* Аудио и Видео элементы */ .media-chat { margin-top: 10px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; } .media-chat audio, .media-chat video { width: 100%; max-height: 300px; margin-top: 5px; border: 1px solid #ddd; border-radius: 6px; } /* Медиа запросы для адаптивности */ @media (max-width: 768px) { .main { flex-direction: column; } .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #ddd; } .chat-section { padding: 15px; } .input-section, .file-section { flex-direction: column; } .input-section input[type="text"], .file-section input[type="file"] { margin-right: 0; margin-bottom: 10px; width: 100%; } .input-section button, .file-section button, #call-btn, #video-call-btn, #share-screen-btn { width: 100%; } } </style> - Assistant