From: davidlin Date: Wed, 31 Aug 2016 03:39:16 +0000 (-0700) Subject: FS-9469 X-Git-Tag: v1.6.11~9^2~75^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a0e1af5d69b11f4b935e371bac1d87c7e8b5e30;p=thirdparty%2Ffreeswitch.git FS-9469 added onGrant/onDenied callbacks in onStream/onError of RTCCallbacks so client code gets notified of webrtc permission change immediately remove whitespace changes --- diff --git a/html5/verto/js/src/jquery.verto.js b/html5/verto/js/src/jquery.verto.js index 68cc6d6d80..d0c3563c12 100644 --- a/html5/verto/js/src/jquery.verto.js +++ b/html5/verto/js/src/jquery.verto.js @@ -2010,10 +2010,18 @@ }; 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"); }; 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); dialog.hangup({cause: "Device or Permission Error"}); };