Skip to content

Commit e8d12ce

Browse files
committed
QBWEBSDK-208
1 parent 2e0c50c commit e8d12ce

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

js/modules/webrtc/qbWebRTCSession.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ WebRTCSession.prototype.detachMediaStream = function(id){
167167
};
168168

169169
/**
170-
* Initiate a call
171-
* @param {array} A map with custom parameters
170+
* [Initiate a call]
171+
* @param {object} extension [custom parametrs]
172+
* @param {Function} callback
172173
*/
173174
WebRTCSession.prototype.call = function(extension, callback) {
174175
var self = this,
@@ -227,6 +228,12 @@ WebRTCSession.prototype.accept = function(extension) {
227228
return;
228229
}
229230

231+
if(self.state === WebRTCSession.State.CLOSED) {
232+
Helpers.traceError("Can't accept, the session is already closed, return.");
233+
self.stop({});
234+
return;
235+
}
236+
230237
self.state = WebRTCSession.State.ACTIVE;
231238

232239
self.acceptCallTime = new Date();

quickblox.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/webrtc/app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@
334334
});
335335

336336
ui.$callees.append(videoElems);
337-
ui.setPositionFooter();
338337
ui.updateMsg( {msg: 'during_call', obj: {name: app.caller.full_name}} );
338+
ui.setPositionFooter();
339339

340340
app.currentSession.accept({});
341341
}
@@ -620,7 +620,6 @@
620620
console.log('userID: ' + userID);
621621
console.log('Session: ' + session);
622622
console.groupEnd();
623-
624623
app.currentSession.peerConnections[userID].stream = stream;
625624

626625
app.currentSession.attachMediaStream('remote_video_' + userID, stream);

samples/webrtc/styles.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ body {
461461
display: inline-block;
462462
position: relative;
463463
width: 50%;
464+
465+
padding-top: 14px;
464466
padding-right: 10px;
465467

466468
vertical-align: top;
@@ -473,11 +475,14 @@ body {
473475

474476

475477
.callees__callee_inner {
478+
position: relative;
476479
margin: 0 0 10px 0;
477480
}
478481

479482
.callees__callee_status {
480-
margin: 0 0 3px 0;
483+
position: absolute;
484+
width: 100%;
485+
top: -14px;
481486

482487
font-size: 11px;
483488
text-transform: uppercase;
@@ -493,7 +498,7 @@ body {
493498
.callees__callee_video.active {
494499
border-color: #41cc44;
495500
}
496-
.callees__callee-wait .callees__callee_video:before{
501+
.callees__callee-wait .callees__callee_inner:before{
497502
content: " ";
498503
display: block;
499504

0 commit comments

Comments
 (0)