givo / lib-kurento

A typescript library for simplifying the use of Kurento in Node.js
24 stars 5 forks source link

WebSocket.on is not defined #8

Closed jmezzera closed 3 years ago

jmezzera commented 4 years ago

Hi, In both examples of the README, there's a call to socket.on where socket is of type WebSocket. However, WebSocket does not have any member on. How do I proceed?

I'm compiling to es5 and have the libraries for es2019 and dom in my tsconfig.json

Thanks in advance.

givo commented 4 years ago

It's not a working example, I preset a theoretical signaling mechanism. I can recommend using socketio or if you can use an HTTP signaling mechanism and make you application stateless as much as you can!