From 34e8c062de18600229a96ef8455cd478ef9dfc6a Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Thu, 13 Oct 2016 10:11:57 -0700 Subject: [PATCH] FS-9640: Allow access to Verto stream object via callback Exposes Verto MediaStream objects via the onGranted() callback --- html5/verto/js/src/jquery.FSRTC.js | 2 +- html5/verto/js/src/jquery.verto.js | 2 +- html5/verto/video_demo/js/verto-min.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index e415c99a72..15264c0dfb 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -422,7 +422,7 @@ } }); - onStreamSuccess(self); + onStreamSuccess(self, stream); } function onError(e) { diff --git a/html5/verto/js/src/jquery.verto.js b/html5/verto/js/src/jquery.verto.js index 9b675f8b7d..fd8a97c2cc 100644 --- a/html5/verto/js/src/jquery.verto.js +++ b/html5/verto/js/src/jquery.verto.js @@ -2020,7 +2020,7 @@ RTCcallbacks.onStream = function(rtc, stream) { if (dialog.verto.options.permissionCallback && typeof dialog.verto.options.permissionCallback.onGranted === 'function'){ - dialog.verto.options.permissionCallback.onGranted(); + dialog.verto.options.permissionCallback.onGranted(stream); } console.log("stream started"); }; diff --git a/html5/verto/video_demo/js/verto-min.js b/html5/verto/video_demo/js/verto-min.js index 65d44eb85d..10d28ea85b 100644 --- a/html5/verto/video_demo/js/verto-min.js +++ b/html5/verto/video_demo/js/verto-min.js @@ -40,7 +40,7 @@ $.FSRTC.prototype.getVideoMute=function(){var self=this;return self.videoEnabled $.FSRTC.prototype.setVideoMute=function(what){var self=this;var videoTracks=self.localStream.getVideoTracks();for(var i=0,len=videoTracks.length;i