From: Christopher Rienzo Date: Tue, 28 Aug 2018 13:05:53 +0000 (+0000) Subject: Merge pull request #1544 in FS/freeswitch from ~THEHUNMONKGROUP/freeswitch:bugfix... X-Git-Tag: v1.8.2~1^2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abca94578b2a8c0931948681f80b1fe67750bbcc;p=thirdparty%2Ffreeswitch.git Merge pull request #1544 in FS/freeswitch from ~THEHUNMONKGROUP/freeswitch:bugfix/FS-11280-allow-overriding-permissioncallback to master * commit '36d9f7bc5e4a1644cdcf8c00df976d5283885ea3': FS-11280: Allow overriding permissionCallback per Verto dialog --- abca94578b2a8c0931948681f80b1fe67750bbcc diff --cc html5/verto/js/src/jquery.verto.js index 43e76e4b2d,5db7951d78..9b920151cd --- a/html5/verto/js/src/jquery.verto.js +++ b/html5/verto/js/src/jquery.verto.js @@@ -2062,15 -2064,12 +2066,19 @@@ 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 && + if (dialog.callbacks.permissionCallback && + typeof dialog.callbacks.permissionCallback.onDenied === 'function') { + dialog.callbacks.permissionCallback.onDenied(); + } + else if (dialog.verto.options.permissionCallback && typeof dialog.verto.options.permissionCallback.onDenied === 'function'){ dialog.verto.options.permissionCallback.onDenied(); }