Skip to content

Commit 11e51ed

Browse files
committed
Merge remote-tracking branch 'remotes/origin/develop' into develop.QBWEBSDK-240
Conflicts: quickblox.min.js samples/webrtc/config.js samples/webrtc/index.html
2 parents 2883ed8 + 05465bb commit 11e51ed

File tree

9 files changed

+32
-23
lines changed

9 files changed

+32
-23
lines changed

.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
language: node_js
22
node_js:
33
- "4.1"
4+
5+
branches:
6+
only:
7+
- gh-pages
48

59
before_script: "npm run-script setDependencies"
610

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For correct work of JS SDK you must include the library in your html before `qu
2020

2121
```html
2222
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
23-
<script src="https://cdnjs.cloudflare.com/ajax/libs/quickblox/2.0.4/quickblox.min.js"></script>
23+
<script src="https://cdnjs.cloudflare.com/ajax/libs/quickblox/2.1.0/quickblox.min.js"></script>
2424
```
2525

2626
## Bower and RequireJS
@@ -79,8 +79,8 @@ The quickblox.js library is build from a number of **CommonJS modules** containe
7979
These modules are combined through [browserify](http://browserify.org/) into a single `quickblox.js` file in the root and so this is the only file that needs to be included in a `<script>` tag OR in a RequireJS application OR in Node.js environment (everywhere). To build the library, use the [Grunt](http://gruntjs.com/) task runner:
8080

8181
* You need to have the dependencies listed in the package.json available, use `npm install` to load them.
82-
* Install grunt-cli `npm install -g grunt-cli`
83-
* Also you need install jasmine global `npm i -g jasmine` for tests.
82+
* Install **grunt-cli** `npm install -g grunt-cli`
83+
* Also you need install **jasmine** global `npm i -g jasmine` for tests.
8484
* Change the 'version' properties in next files:
8585
* https://github.com/QuickBlox/quickblox-javascript-sdk/blob/gh-pages/js/qbConfig.js
8686
* https://github.com/QuickBlox/quickblox-javascript-sdk/blob/gh-pages/bower.json

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "2.0.4",
4+
"version": "2.1.0",
55
"homepage": "http://quickblox.com/developers/Javascript",
66
"main": "quickblox.js",
77
"license": "MIT",

js/modules/qbChat.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,22 +328,22 @@ ChatProxy.prototype = {
328328

329329
switch (status) {
330330
case Strophe.Status.ERROR:
331-
err = getError(422, 'Status.ERROR - An error has occurred');
331+
err = Utils.getError(422, 'Status.ERROR - An error has occurred');
332332
if (typeof callback === 'function') callback(err, null);
333333
break;
334334
case Strophe.Status.CONNECTING:
335335
Utils.QBLog('[ChatProxy]', 'Status.CONNECTING');
336336
Utils.QBLog('[ChatProxy]', 'Chat Protocol - ' + (config.chatProtocol.active === 1 ? 'BOSH' : 'WebSocket'));
337337
break;
338338
case Strophe.Status.CONNFAIL:
339-
err = getError(422, 'Status.CONNFAIL - The connection attempt failed');
339+
err = Utils.getError(422, 'Status.CONNFAIL - The connection attempt failed');
340340
if (typeof callback === 'function') callback(err, null);
341341
break;
342342
case Strophe.Status.AUTHENTICATING:
343343
Utils.QBLog('[ChatProxy]', 'Status.AUTHENTICATING');
344344
break;
345345
case Strophe.Status.AUTHFAIL:
346-
err = getError(401, 'Status.AUTHFAIL - The authentication attempt failed');
346+
err = Utils.getError(401, 'Status.AUTHFAIL - The authentication attempt failed');
347347
if (typeof callback === 'function') callback(err, null);
348348
break;
349349
case Strophe.Status.CONNECTED:
@@ -1001,7 +1001,7 @@ PrivacyListProxy.prototype = {
10011001
var errorObject = getErrorFromXMLNode(stanzaError);
10021002
callback(errorObject, null);
10031003
}else{
1004-
callback(getError(408), null);
1004+
callback(Utils.getError(408), null);
10051005
}
10061006
});
10071007
},
@@ -1041,7 +1041,7 @@ PrivacyListProxy.prototype = {
10411041
var errorObject = getErrorFromXMLNode(stanzaError);
10421042
callback(errorObject, null);
10431043
}else{
1044-
callback(getError(408), null);
1044+
callback(Utils.getError(408), null);
10451045
}
10461046
});
10471047
},
@@ -1105,7 +1105,7 @@ PrivacyListProxy.prototype = {
11051105
var errorObject = getErrorFromXMLNode(stanzaError);
11061106
callback(errorObject);
11071107
}else{
1108-
callback(getError(408));
1108+
callback(Utils.getError(408));
11091109
}
11101110
});
11111111
},
@@ -1154,7 +1154,7 @@ PrivacyListProxy.prototype = {
11541154
var errorObject = getErrorFromXMLNode(stanzaError);
11551155
callback(errorObject);
11561156
}else{
1157-
callback(getError(408));
1157+
callback(Utils.getError(408));
11581158
}
11591159
});
11601160
},
@@ -1177,7 +1177,7 @@ PrivacyListProxy.prototype = {
11771177
var errorObject = getErrorFromXMLNode(stanzaError);
11781178
callback(errorObject);
11791179
}else{
1180-
callback(getError(408));
1180+
callback(Utils.getError(408));
11811181
}
11821182
});
11831183
},
@@ -1200,7 +1200,7 @@ PrivacyListProxy.prototype = {
12001200
var errorObject = getErrorFromXMLNode(stanzaError);
12011201
callback(errorObject);
12021202
}else{
1203-
callback(getError(408));
1203+
callback(Utils.getError(408));
12041204
}
12051205
});
12061206
}
@@ -1407,7 +1407,7 @@ function getErrorFromXMLNode(stanzaError) {
14071407
var errorElement = stanzaError.getElementsByTagName('error')[0];
14081408
var errorCode = parseInt(errorElement.getAttribute('code'));
14091409
var errorText = errorElement.getElementsByTagName('text')[0].textContent;
1410-
return getError(errorCode, errorText);
1410+
return Utils.getError(errorCode, errorText);
14111411
}
14121412

14131413
function getLocalTime() {

js/qbConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
var config = {
13-
version: '2.0.4',
13+
version: '2.1.0',
1414
creds: {
1515
appId: '',
1616
authKey: '',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "2.0.4",
4+
"version": "2.1.0",
55
"homepage": "http://quickblox.com/developers/Javascript",
66
"main": "js/qbMain.js",
77
"license": [

quickblox.min.js

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

samples/webrtc/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66

77
<title>QuickBlox JavaScript WebRTC sample</title>
8+
9+
<link rel="canonical" href="https://quickblox.github.io/quickblox-javascript-sdk/samples/webrtc" />
810

911
<link rel="shortcut icon" href="https://quickblox.com/favicon.ico">
1012

@@ -280,13 +282,19 @@ <h4>Call from <strong class="j-ic_initiator"></strong></h4>
280282
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
281283
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
282284

283-
<script src="../../quickblox.js"></script>
285+
<script src="../../quickblox.min.js"></script>
284286
<!-- Routing lib -->
285287
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script>
286288

287289
<script src="config.js"></script>
288290
<script src="js/helpers.js"></script>
289291
<!-- <script src="js/msgBoard.js"></script> -->
290292
<script src="js/app.js"></script>
293+
294+
<script type="text/javascript">
295+
var host = "quickblox.github.io";
296+
if ((host == window.location.host) && (window.location.protocol != "https:"))
297+
window.location.protocol = "https";
298+
</script>
291299
</body>
292300
</html>

0 commit comments

Comments
 (0)