Merge pull request #1552 in FS/freeswitch from ~THEHUNMONKGROUP/freeswitch:feature/FS-11286-add-onremotestream-callback-to-verto to master

* commit '61cdf6361739f0ecaef8d2766aa0bd5bb45ed731':
  FS-11286: Add onRemoteStream callback to Verto dialogs
This commit is contained in:
Christopher Rienzo 2018-08-24 13:16:54 +00:00
commit 2fd87793b9
2 changed files with 13 additions and 0 deletions

View File

@ -189,6 +189,11 @@
doCallback(self, "onStream", stream);
}
function onRemoteStreamSuccess(self, stream) {
console.log("Remote Stream Success");
doCallback(self, "onRemoteStream", stream);
}
function onICE(self, candidate) {
self.mediaData.candidate = candidate;
self.mediaData.candidateList.push(self.mediaData.candidate);
@ -258,6 +263,7 @@
//self.options.useAudio.play();
self.remoteStream = stream;
onRemoteStreamSuccess(self, stream);
}
function onOfferSDP(self, sdp) {

View File

@ -2062,6 +2062,13 @@
console.log("stream started");
};
RTCcallbacks.onRemoteStream = function(rtc, stream) {
if (typeof dialog.callbacks.onRemoteStream === 'function') {
dialog.callbacks.onRemoteStream(stream, dialog);
}
console.log("remote stream started");
};
RTCcallbacks.onError = function(e) {
if (dialog.verto.options.permissionCallback &&
typeof dialog.verto.options.permissionCallback.onDenied === 'function'){