Aa
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
2
main.js
2
main.js
@@ -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;
|
||||||
// 앱 준비 완료
|
// 앱 준비 완료
|
||||||
|
|||||||
Reference in New Issue
Block a user