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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="webrtc-controls">
|
<div id="webrtc-controls">
|
||||||
|
<audio id="call" autoplay controls></audio>
|
||||||
<input type="text" id="peer-id-input" placeholder="상대방 ID 입력">
|
<input type="text" id="peer-id-input" placeholder="상대방 ID 입력">
|
||||||
<button id="call-btn">전화걸기</button>
|
<button id="call-btn">전화걸기</button>
|
||||||
<button id="hangup-btn">끊기</button>
|
<button id="hangup-btn">끊기</button>
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ export class UIController {
|
|||||||
|
|
||||||
// 원격 스트림 수신 시 자동 재생
|
// 원격 스트림 수신 시 자동 재생
|
||||||
rtcManager.onRemoteStream = (stream) => {
|
rtcManager.onRemoteStream = (stream) => {
|
||||||
const audio = new Audio();
|
// const audio = new Audio();
|
||||||
|
const audio = document.querySelector('#call');
|
||||||
console.log(rtcManager)
|
console.log(rtcManager)
|
||||||
console.log(stream)
|
console.log(stream)
|
||||||
audio.muted = false;
|
audio.muted = false;
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ export class WebRTCManager {
|
|||||||
hangup() {
|
hangup() {
|
||||||
this.pc?.close();
|
this.pc?.close();
|
||||||
this.localStream?.getTracks().forEach(t => t.stop());
|
this.localStream?.getTracks().forEach(t => t.stop());
|
||||||
this.ws?.close();
|
// this.ws?.close();
|
||||||
console.log('📞 통화 종료');
|
console.log('📞 통화 종료');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user