Publisher doesn't notify when connection is destroyed or diconnected. In Openvidu docs, they suggest connectionDestroyed
& sessionDisconnected
event but it doesn't trigger anymore. How can i solve this issue ? From publisher side i need to inform publisher while network is lost and connection is destroyed.
session.on('connectionDestroyed', reason => {
//...
//Doesn't trigger
});
session.on('sessionDisconnected', reason => {
//...
//Doesn't trigger
});
Updated:
sessionDisconnected
event is invoked when i reconnect successfully or gracefully close the session. But i need to inform publisher immediately when internet connection is lost.
Try the following:
and
Both are working for me.