This commit is contained in:
2025-10-20 21:23:53 +09:00
parent 47cb814162
commit 43715653b3
2 changed files with 4 additions and 0 deletions

View File

@@ -95,6 +95,8 @@ window.electronAPI.receive('webrtcSignal', async (data) => {
if (!peerConnection) return; if (!peerConnection) return;
if (data.type === 'icecandidate' && data.candidate) { if (data.type === 'icecandidate' && data.candidate) {
await peerConnection.addIceCandidate(new RTCIceCandidate(data.candidate)); await peerConnection.addIceCandidate(new RTCIceCandidate(data.candidate));
} else if(data.type === 'answer') {
await peerConnection.setRemoteDescription(new RTCSessionDescription(data.answer));
} }
} catch (err) { } catch (err) {
console.error('ICE candidate 처리 오류:', err); console.error('ICE candidate 처리 오류:', err);

View File

@@ -15,6 +15,7 @@ let mainWindow = null;
let socket = null; let socket = null;
let peerConnection = null; let peerConnection = null;
let displayId = null; let displayId = null;
let offer = null;
// 자동 시작 설정 // 자동 시작 설정
app.setLoginItemSettings({ app.setLoginItemSettings({
@@ -152,6 +153,7 @@ function connectToSignaling() {
// 입력 이벤트 리스너 설정 // 입력 이벤트 리스너 설정
setupInputHandler(); setupInputHandler();
} }
// 앱 준비 시 // 앱 준비 시
let rendererWindow = null; let rendererWindow = null;
// 앱 준비 완료 // 앱 준비 완료