ㄴㅇㄹ

This commit is contained in:
2025-09-20 11:37:58 +09:00
parent 161b18d10a
commit 66c4d6f7e5
3 changed files with 4 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
</head>
<body>
<div id="webrtc-controls">
<audio id="call" autoplay controls></audio>
<input type="text" id="peer-id-input" placeholder="상대방 ID 입력">
<button id="call-btn">전화걸기</button>
<button id="hangup-btn">끊기</button>

View File

@@ -47,7 +47,8 @@ export class UIController {
// 원격 스트림 수신 시 자동 재생
rtcManager.onRemoteStream = (stream) => {
const audio = new Audio();
// const audio = new Audio();
const audio = document.querySelector('#call');
console.log(rtcManager)
console.log(stream)
audio.muted = false;

View File

@@ -206,7 +206,7 @@ export class WebRTCManager {
hangup() {
this.pc?.close();
this.localStream?.getTracks().forEach(t => t.stop());
this.ws?.close();
// this.ws?.close();
console.log('📞 통화 종료');
}
}