提交 2fd87793 authored 作者: Christopher Rienzo's avatar Christopher Rienzo

Merge pull request #1552 in FS/freeswitch from…

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

* commit '61cdf636':
  FS-11286: Add onRemoteStream callback to Verto dialogs
......@@ -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) {
......
......@@ -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'){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论