Skip to content

Commit 3000274

Browse files
author
dimaspirit
committed
review qbHelpers
1 parent 022b591 commit 3000274

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

js/modules/webrtc/qbWebRTCHelpers.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
/*
1+
/**
22
* QuickBlox JavaScript SDK
3-
*
43
* WebRTC Module (WebRTC helpers)
5-
*
64
*/
75

8-
var config = require('../../qbConfig');
9-
var download = require('../../../lib/download/download.min');
6+
var config = require('../../qbConfig');
7+
var download = require('../../../lib/download/download.min');
108

11-
function WebRTCHelpers() {
12-
13-
}
9+
var WebRTCHelpers = {};
1410

1511
WebRTCHelpers = {
1612
getUserJid: function(id, appId) {
@@ -41,7 +37,7 @@ WebRTCHelpers = {
4137
},
4238

4339
getLocalTime: function() {
44-
var arr = (new Date).toString().split(' ');
40+
var arr = new Date().toString().split(' ');
4541
return arr.slice(1,5).join('-');
4642
},
4743

@@ -58,6 +54,10 @@ WebRTCHelpers = {
5854
}
5955
};
6056

57+
/**
58+
* [SessionConnectionState]
59+
* @type {Object}
60+
*/
6161
WebRTCHelpers.SessionConnectionState = {
6262
UNDEFINED: 0,
6363
CONNECTING: 1,
@@ -68,14 +68,18 @@ WebRTCHelpers.SessionConnectionState = {
6868
COMPLETED: 6
6969
};
7070

71+
/**
72+
* [CallType]
73+
* @type {Object}
74+
*/
7175
WebRTCHelpers.CallType = {
7276
VIDEO: 1,
7377
AUDIO: 2
7478
};
7579

76-
// Download Blob to local file system
80+
/** Download Blob to local file system */
7781
Blob.prototype.download = function() {
7882
download(this, this.name, this.type);
7983
};
8084

81-
module.exports = WebRTCHelpers;
85+
module.exports = WebRTCHelpers;

0 commit comments

Comments
 (0)