@@ -104,7 +104,7 @@ export class CallsManager {
104
104
this . onStateChanged ( this . state ) ;
105
105
} ;
106
106
107
- const onIncomingCall = async ( payload : string ) => {
107
+ const acceptCall = async ( payload : string ) => {
108
108
await this . setIceServersPromise ;
109
109
const gatheredEnoughIceP = gatheredEnoughIce ( this . peerConnection ) ;
110
110
@@ -130,7 +130,7 @@ export class CallsManager {
130
130
logSDP ( "Answering incoming call with answer:" , answer ) ;
131
131
window . calls . acceptCall ( answer ) ;
132
132
} ;
133
- const onAcceptedCall = ( payload : string ) => {
133
+ const onAnswer = ( payload : string ) => {
134
134
const answerObject = {
135
135
type : "answer" ,
136
136
sdp : payload ,
@@ -152,11 +152,11 @@ export class CallsManager {
152
152
} else if ( hash . startsWith ( "acceptCall=" ) ) {
153
153
const offer = window . atob ( hash . substring ( 11 ) ) ;
154
154
logSDP ( "Incoming call with offer:" , offer ) ;
155
- await onIncomingCall ( offer ) ;
155
+ await acceptCall ( offer ) ;
156
156
} else if ( hash . startsWith ( "onAnswer=" ) ) {
157
157
const answer = window . atob ( hash . substring ( 9 ) ) ;
158
158
logSDP ( "Outgoing call was accepted with answer:" , answer ) ;
159
- onAcceptedCall ( answer ) ;
159
+ onAnswer ( answer ) ;
160
160
} else {
161
161
console . log ( "unexpected URL hash: " , hash ) ;
162
162
}
0 commit comments