Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes call to undefined method(which fixes crash on lastN switch and when clicking contact on the contactlist).
paweldomas420bbe136cd8
diff --git a/index.html b/index.htmlindex 7ef59162be..f548ec6845 100644--- a/index.html+++ b/index.html@@ -22,7 +22,7 @@<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --><script src="libs/toastr.js?v=1"></script><!-- notifications lib --><script src="interface_config.js?v=5"></script>- <script src="libs/app.bundle.js?v=101"></script>+ <script src="libs/app.bundle.js?v=102"></script><script src="analytics.js?v=1"></script><!-- google analytics plugin --><link rel="stylesheet" href="css/font.css?v=7"/><link rel="stylesheet" href="css/toastr.css?v=1">diff --git a/libs/app.bundle.js b/libs/app.bundle.jsindex 9708bc012d..1e8b6dc779 100644--- a/libs/app.bundle.js+++ b/libs/app.bundle.js@@ -9511,6 +9511,37 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream, isVideo, id)this.VideoLayout.updateRemovedVideo(this.resourceJid);};+RemoteVideo.prototype.waitForPlayback = function (stream) {++ var isVideo = stream.getVideoTracks().length > 0;+ if (!isVideo || stream.id === 'mixedmslabel') {+ return;+ }++ var self = this;+ var sel = this.VideoLayout.getPeerVideoSel(this.resourceJid);++ // Register 'onplaying' listener to trigger 'videoactive' on VideoLayout+ // when video playback starts+ var onPlayingHandler = function () {+ // FIXME: why do i have to do this for FF?+ if (RTCBrowserType.isFirefox()) {+ APP.RTC.attachMediaStream(sel, stream);+ }+ if (RTCBrowserType.isTemasysPluginUsed()) {+ sel = $('#' + newElementId);+ }+ self.VideoLayout.videoactive(sel, self.resourceJid);+ sel[0].onplaying = null;+ if (RTCBrowserType.isTemasysPluginUsed()) {+ // 'currentTime' is used to check if the video has started+ // and the value is not set by the plugin, so we do it+ sel[0].currentTime = 1;+ }+ };+ sel[0].onplaying = onPlayingHandler;+};+RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {if (!this.container)return;@@ -9526,35 +9557,12 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {sel.hide();// If the container is currently visible we attach the stream.- if (!isVideo- || (this.container.offsetParent !== null && isVideo)) {-- // Register 'onplaying' listener to trigger 'videoactive' on VideoLayout- // when video playback starts- if (isVideo && stream.id !== 'mixedmslabel') {- var onPlayingHandler = function () {- // FIXME: why do i have to do this for FF?- if (RTCBrowserType.isFirefox()) {- APP.RTC.attachMediaStream(sel, stream);- }- if (RTCBrowserType.isTemasysPluginUsed()) {- sel = $('#' + newElementId);- }- self.VideoLayout.videoactive(sel, self.resourceJid);- sel[0].onplaying = null;- if (RTCBrowserType.isTemasysPluginUsed()) {- // 'currentTime' is used to check if the video has started- // and the value is not set by the plugin, so we do it- sel[0].currentTime = 1;- }- };- sel[0].onplaying = onPlayingHandler;- }+ if (!isVideo || (this.container.offsetParent !== null && isVideo)) {+ waitForPlayback(stream);APP.RTC.attachMediaStream(sel, stream);}- var self = this;stream.onended = function () {console.log('stream ended', this);@@ -10595,7 +10603,7 @@ var VideoLayout = (function (my) {}var resource = Strophe.getResourceFromJid(jid);- var videoSel = VideoLayout.getVideoSelector(resource);+ var videoSel = VideoLayout.getPeerVideoSel(resource);if (videoSel.length > 0) {var videoThumb = videoSel[0];// It is not always the case that a videoThumb exists (if there is@@ -10833,7 +10841,7 @@ var VideoLayout = (function (my) {updateLargeVideo = false;}- remoteVideos[resourceJid].waitForRemoteVideo(sel, mediaStream.ssrc, mediaStream.stream);+ remoteVideos[resourceJid].waitForPlayback(mediaStream.stream);}});}@@ -14370,15 +14378,6 @@ JingleSession.prototype._modifySources = function (successCallback, queueCallbac});this.removessrc = [];- // FIXME:- // this was a hack for the situation when only one peer exists- // in the conference.- // check if still required and remove- if (sdp.media[0])- sdp.media[0] = sdp.media[0].replace('a=recvonly', 'a=sendrecv');- if (sdp.media[1])- sdp.media[1] = sdp.media[1].replace('a=recvonly', 'a=sendrecv');-sdp.raw = sdp.session + sdp.media.join('');this.peerconnection.setRemoteDescription(new RTCSessionDescription({type: 'offer', sdp: sdp.raw}),function() {diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.jsindex 25b5fd173c..1f62c4ffab 100644--- a/modules/UI/videolayout/RemoteVideo.js+++ b/modules/UI/videolayout/RemoteVideo.js@@ -165,6 +165,37 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream, isVideo, id)this.VideoLayout.updateRemovedVideo(this.resourceJid);};+RemoteVideo.prototype.waitForPlayback = function (stream) {++ var isVideo = stream.getVideoTracks().length > 0;+ if (!isVideo || stream.id === 'mixedmslabel') {+ return;+ }++ var self = this;+ var sel = this.VideoLayout.getPeerVideoSel(this.resourceJid);++ // Register 'onplaying' listener to trigger 'videoactive' on VideoLayout+ // when video playback starts+ var onPlayingHandler = function () {+ // FIXME: why do i have to do this for FF?+ if (RTCBrowserType.isFirefox()) {+ APP.RTC.attachMediaStream(sel, stream);+ }+ if (RTCBrowserType.isTemasysPluginUsed()) {+ sel = $('#' + newElementId);+ }+ self.VideoLayout.videoactive(sel, self.resourceJid);+ sel[0].onplaying = null;+ if (RTCBrowserType.isTemasysPluginUsed()) {+ // 'currentTime' is used to check if the video has started+ // and the value is not set by the plugin, so we do it+ sel[0].currentTime = 1;+ }+ };+ sel[0].onplaying = onPlayingHandler;+};+RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {if (!this.container)return;@@ -180,35 +211,12 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {sel.hide();// If the container is currently visible we attach the stream.- if (!isVideo- || (this.container.offsetParent !== null && isVideo)) {-- // Register 'onplaying' listener to trigger 'videoactive' on VideoLayout- // when video playback starts- if (isVideo && stream.id !== 'mixedmslabel') {- var onPlayingHandler = function () {- // FIXME: why do i have to do this for FF?- if (RTCBrowserType.isFirefox()) {- APP.RTC.attachMediaStream(sel, stream);- }- if (RTCBrowserType.isTemasysPluginUsed()) {- sel = $('#' + newElementId);- }- self.VideoLayout.videoactive(sel, self.resourceJid);- sel[0].onplaying = null;- if (RTCBrowserType.isTemasysPluginUsed()) {- // 'currentTime' is used to check if the video has started- // and the value is not set by the plugin, so we do it- sel[0].currentTime = 1;- }- };- sel[0].onplaying = onPlayingHandler;- }+ if (!isVideo || (this.container.offsetParent !== null && isVideo)) {+ waitForPlayback(stream);APP.RTC.attachMediaStream(sel, stream);}- var self = this;stream.onended = function () {console.log('stream ended', this);diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.jsindex 88ab62c4a9..a7b72091db 100644--- a/modules/UI/videolayout/VideoLayout.js+++ b/modules/UI/videolayout/VideoLayout.js@@ -475,7 +475,7 @@ var VideoLayout = (function (my) {}var resource = Strophe.getResourceFromJid(jid);- var videoSel = VideoLayout.getVideoSelector(resource);+ var videoSel = VideoLayout.getPeerVideoSel(resource);if (videoSel.length > 0) {var videoThumb = videoSel[0];// It is not always the case that a videoThumb exists (if there is@@ -713,7 +713,7 @@ var VideoLayout = (function (my) {updateLargeVideo = false;}- remoteVideos[resourceJid].waitForRemoteVideo(sel, mediaStream.ssrc, mediaStream.stream);+ remoteVideos[resourceJid].waitForPlayback(mediaStream.stream);}});}