提交 a625f5ee authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #943 in FS/freeswitch from…

Merge pull request #943 in FS/freeswitch from ~DAVIDL/freeswitch-verto-permission-event:feature/verto-permission-event to master

* commit '5a0e1af5':
  FS-9469 added onGrant/onDenied callbacks in onStream/onError of RTCCallbacks so client code gets notified of webrtc permission change immediately
...@@ -2010,10 +2010,18 @@ ...@@ -2010,10 +2010,18 @@
}; };
RTCcallbacks.onStream = function(rtc, stream) { RTCcallbacks.onStream = function(rtc, stream) {
if (dialog.verto.options.permissionCallback &&
typeof dialog.verto.options.permissionCallback.onGranted === 'function'){
dialog.verto.options.permissionCallback.onGranted();
}
console.log("stream started"); console.log("stream started");
}; };
RTCcallbacks.onError = function(e) { RTCcallbacks.onError = function(e) {
if (dialog.verto.options.permissionCallback &&
typeof dialog.verto.options.permissionCallback.onDenied === 'function'){
dialog.verto.options.permissionCallback.onDenied();
}
console.error("ERROR:", e); console.error("ERROR:", e);
dialog.hangup({cause: "Device or Permission Error"}); dialog.hangup({cause: "Device or Permission Error"});
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论