I'm using node-js API to use kurento. So, I connect sender's webrtcendpoint to receiver endpoint using code -
senderWebRtcEndPoint.connect(receiverWebRtcEndPoint, function(error) {
if (error) {
return console.log("Error in connecting endpoints :: "+error);
}
io.log.info("EndPointConnected");
});
Using this code media start streaming to receiver. But, if sender get disconnect -
- How to disconnect receiver endpoint to sender's endpoint?
- How to destroy sender endpoint?
- How to release that sender endpoint from mediapipeline?
- When new sender endpoint is created how to reuse the receiver's endpoint to connect newly created sender's endpoint?
It would be more helpful if I could get an example(using JS-API) highlighting these -
- disconnect endpoints from each other
- destroying endpoints
- destroying a pipeline
- reconnect old endpoint to new endpoint
- any event of endpoint notifying endpoint get connected and disconnected to other endpoint