versatica / JsSIP

JsSIP, the JavaScript SIP library
https://jssip.net
Other
2.42k stars 744 forks source link

RTCSession.isReadyToReOffer method is undefined #807

Open Abbyzhoum opened 1 year ago

Abbyzhoum commented 1 year ago

When I use the isReadyToReOffer method to verify if it supports unhold call,I found that the isReadyToReOffer method does not exist. I use _isReadyToReOffer is OK. Please check the issue,Thanks!

1676016967191

1676016612201

PeteAUK commented 1 year ago

Have you tried isReadyToReoffer without the underscore _?

Abbyzhoum commented 1 year ago

I tried, look at the picture above

tshi206 commented 3 months ago

https://github.com/versatica/JsSIP/blob/master/lib/RTCSession.d.ts

The type definition is indeed inconsistent with the actual js class, it doesn't even define a isReadyToReOffer method, consider exposing it correctly as the official doc suggests

https://github.com/versatica/JsSIP/blob/fff94c5abf5f2893ed35eac35af713bef73ec949/lib/RTCSession.js#L1681

tshi206 commented 3 months ago

also https://github.com/versatica/JsSIP/blob/master/lib/JsSIP.d.ts#L13

it doesn't export Socket and WeightedSocket, please consider adjusting the d.ts by removing those two.

https://github.com/versatica/JsSIP/blob/master/lib/WebSocketInterface.js#L6