Temasys / SkylinkJS

SkylinkJS Javascript WebRTC SDK
http://skylink.io/web
Other
275 stars 57 forks source link

error happened, cause connection can not be established #337

Closed edushare closed 6 years ago

edushare commented 6 years ago

qq 20180910091327

edushare commented 6 years ago

there should be a protection , if Datachanel is not available, message should be send through signaling

iyharini commented 6 years ago

Hi edushare,

Thank you for your feedback.

The SDK provides public methods and events that you can use to handle this.

We would suggest listening to the DataChannelState Event (https://cdn.temasys.io/skylink/skylinkjs/latest/doc/classes/Skylink.html#event_dataChannelState).

If the state is not OPEN, you can send the message via Signaling using the sendMessage method (https://cdn.temasys.io/skylink/skylinkjs/latest/doc/classes/Skylink.html#method_sendMessage).