Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-15 16:25:49 +0300
committerSteffen Lindner <mail@steffen-lindner.de>2018-03-19 15:35:36 +0300
commit7428175521bb69be9701dfe6e57c4b1b886b5f8b (patch)
tree66a0f3dd97168d8962ac120c1e42a4fe6fea9913 /js/webrtc.js
parentbc94202c15b5322ec08105f842e8e533e276d076 (diff)
Only setup webrtc and media when joining a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'js/webrtc.js')
-rw-r--r--js/webrtc.js26
1 files changed, 7 insertions, 19 deletions
diff --git a/js/webrtc.js b/js/webrtc.js
index 3a8c498eb..a4a77cbab 100644
--- a/js/webrtc.js
+++ b/js/webrtc.js
@@ -226,9 +226,12 @@ var spreedPeerConnectionTable = [];
nick: nick
});
- OCA.SpreedMe.webrtc = webrtc;
- app.startSpreed();
+ webrtc.on('localScreenStopped', function() {
+ app.screensharingStopped();
+ });
+
+ OCA.SpreedMe.webrtc = webrtc;
var spreedListofSpeakers = {};
var spreedListofSharedScreens = {};
@@ -643,7 +646,7 @@ var spreedPeerConnectionTable = [];
});
OCA.SpreedMe.webrtc.on('localMediaStarted', function (configuration) {
- OCA.SpreedMe.app.startLocalMedia(configuration);
+ app.startLocalMedia(configuration);
});
OCA.SpreedMe.webrtc.on('localMediaError', function(error) {
@@ -667,7 +670,7 @@ var spreedPeerConnectionTable = [];
console.log('Error while accessing microphone & camera: ', error.message || error.name);
}
- OCA.SpreedMe.app.setEmptyContentMessage(
+ app.setEmptyContentMessage(
'icon-video-off',
message,
messageAdditional
@@ -691,21 +694,6 @@ var spreedPeerConnectionTable = [];
);
}
- OCA.SpreedMe.webrtc.on('joinedRoom', function(name) {
- OCA.SpreedMe.app.syncAndSetActiveRoom(name);
- });
-
- OCA.SpreedMe.webrtc.on('joinedCall', function() {
- OCA.SpreedMe.app.syncRooms();
-
- $('#app-content').removeClass('icon-loading');
- $('.videoView').removeClass('hidden');
- });
-
- OCA.SpreedMe.webrtc.on('leftCall', function() {
- OCA.SpreedMe.app.syncRooms();
- });
-
OCA.SpreedMe.webrtc.on('channelOpen', function(channel) {
console.log('%s datachannel is open', channel.label);
});