mirror of
https://git.hmsn.ink/call/client.git
synced 2026-03-19 15:54:58 +09:00
ㄴㅇㄹ
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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('📞 통화 종료');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user