Reputation: 5427
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
});
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.
Upvotes: 0
Views: 593
Reputation: 400
Try the following:
session.on('streamCreated', event => { }
and
session.on('sessionDisconnected', (event) => { }
Both are working for me.
Upvotes: 0
Reputation: 396
session.on('streamDestroyed', reason => {
//...
});
Upvotes: 0