Aa
This commit is contained in:
@@ -95,6 +95,8 @@ window.electronAPI.receive('webrtcSignal', async (data) => {
|
||||
if (!peerConnection) return;
|
||||
if (data.type === 'icecandidate' && data.candidate) {
|
||||
await peerConnection.addIceCandidate(new RTCIceCandidate(data.candidate));
|
||||
} else if(data.type === 'answer') {
|
||||
await peerConnection.setRemoteDescription(new RTCSessionDescription(data.answer));
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('ICE candidate 처리 오류:', err);
|
||||
|
||||
2
main.js
2
main.js
@@ -15,6 +15,7 @@ let mainWindow = null;
|
||||
let socket = null;
|
||||
let peerConnection = null;
|
||||
let displayId = null;
|
||||
let offer = null;
|
||||
|
||||
// 자동 시작 설정
|
||||
app.setLoginItemSettings({
|
||||
@@ -152,6 +153,7 @@ function connectToSignaling() {
|
||||
// 입력 이벤트 리스너 설정
|
||||
setupInputHandler();
|
||||
}
|
||||
|
||||
// 앱 준비 시
|
||||
let rendererWindow = null;
|
||||
// 앱 준비 완료
|
||||
|
||||
Reference in New Issue
Block a user