The Connection class is defined in connection.js, but it is not used in connection.js and it is not exported from connection.js. What part of the code uses it?
The Connection class is an ES6 class, but all its methods are assigned as instance fields. This is surprising when using a class because you would normally expect a class to have prototype methods. What I mean is I would normally expect to see this:
classExample{method(){body;}}
And instead you have this:
classExample{method=()=>{body;}}
Explaining why you are doing it this way would help the reader :)
Putting a language tag on your code fences would make it much easier to read!
'''javascript
(I couldn't figure out how to escape code fences here on dev.to, so I used single quotes place of backticks.)
connection class is used in step-7, by calling createSocketConnectionInstance() - also this just rough code with all functionalities to create video and screen sharing application
The Connection class is defined in connection.js, but it is not used in connection.js and it is not exported from connection.js. What part of the code uses it?
The Connection class is an ES6 class, but all its methods are assigned as instance fields. This is surprising when using a class because you would normally expect a class to have prototype methods. What I mean is I would normally expect to see this:
And instead you have this:
Explaining why you are doing it this way would help the reader :)
Putting a language tag on your code fences would make it much easier to read!
(I couldn't figure out how to escape code fences here on dev.to, so I used single quotes place of backticks.)
connection class is used in step-7, by calling createSocketConnectionInstance() - also this just rough code with all functionalities to create video and screen sharing application
new SocketConnection(settings) is used in the code instead of new Connection(settings) in createSocketConnectionInstance()
The code as written says this:
Should that be
new Connection(settings)
instead?yes