SessionDirection enum is undefined
I'm using typescript and I need to detect the direction of a RTCSession. In according to typescript definition of RTCSession, the direction is a SessionDirection, that is an enum described here:
https://github.com/versatica/JsSIP/blob/master/lib/RTCSession.d.ts#L17
However, when I try to use it, I get this error:
TypeError: Cannot read properties of undefined (reading 'INCOMING')
Here a reproduction: https://codesandbox.io/s/typescript-forked-ri3w0?file=/src/index.ts
@phwb,
Any chance you could comment on this one?
Hi, I'm on vacation right now. I can review this problem in a few days
Same problem with Originator, described here:
https://github.com/versatica/JsSIP/blob/master/lib/RTCSession.d.ts#L22
I think that this happens with all enums.
@jmillan Hi, I fix this problem in https://github.com/versatica/JsSIP/pull/648
Please, check your TS environment and whether the file is accessible, it clearly exposes the given type SessionDirection
reopening, #648 waiting for @ibc 's approval.
merged