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-05-04 12:01:46 +0300
committerJoas Schilling <coding@schilljs.com>2018-05-09 12:50:27 +0300
commit319c8017e5579a4f9029f6856b10901f5e2439c4 (patch)
tree10d0779bf181d3cdb5c418b3829e40ac365eece4 /js/webrtc.js
parent18097da5d12279eeb4f34143495580cb47d175a3 (diff)
Join the call only aftrer media access was done
When we delayed the media access, we were all fast with testing. Before this patch, when there was already at least one user in the call and you took longer to accept the media request than webrtc took to init everything, you would always send a black video signal and no sound, because the data was not there, when connections were established with the other users. Now we first request the media and send the join call to the server afterwards. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'js/webrtc.js')
-rw-r--r--js/webrtc.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/js/webrtc.js b/js/webrtc.js
index 26b4a08c8..0d0b15c4e 100644
--- a/js/webrtc.js
+++ b/js/webrtc.js
@@ -188,15 +188,6 @@ var spreedPeerConnectionTable = [];
app.signaling.on('leaveCall', function () {
webrtc.leaveCall();
});
- app.signaling.on('joinCall', function (token) {
- app.setEmptyContentMessage(
- 'icon-video-off',
- t('spreed', 'Waiting for camera and microphone permissions'),
- t('spreed', 'Please, give your browser access to use your camera and microphone in order to use this app.')
- );
-
- webrtc.joinCall(token);
- });
webrtc = new SimpleWebRTC({
localVideoEl: 'localVideo',
@@ -219,6 +210,16 @@ var spreedPeerConnectionTable = [];
});
OCA.SpreedMe.webrtc = webrtc;
+ OCA.SpreedMe.webrtc.startMedia = function (token) {
+ app.setEmptyContentMessage(
+ 'icon-video-off',
+ t('spreed', 'Waiting for camera and microphone permissions'),
+ t('spreed', 'Please, give your browser access to use your camera and microphone in order to use this app.')
+ );
+
+ webrtc.joinCall(token);
+ };
+
var spreedListofSpeakers = {};
var spreedListofSharedScreens = {};
var latestSpeakerId = null;