Using kurento tutorials java samples. I Want to handle stream events like onended etc on the webrtcpeer object. Following is my sample code from where i want to fetch the stream object.
var options = {
localVideo: video,
mediaConstraints: constraints,
onicecandidate: participant.onIceCandidate.bind(participant)
};
var peer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function(error) {
if (error) {
return console.error(error);
}
this.generateOffer(participant.offerToReceiveVideo.bind(participant));
});
I want to handle events in a way similar to as mentions in this question
How should I proceed? Please Help