Skip to content

Commit 64ae4b0

Browse files
committed
JS Style: single quotes, no space between 'function' and parenthesis
1 parent dc26310 commit 64ae4b0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

sample/Archiving/web/js/host.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ session.on('archiveStopped', function(event) {
4141
});
4242

4343
$(document).ready(function() {
44-
$('.start').click(function (event) {
44+
$('.start').click(function(event) {
4545
var options = $('.archive-options').serialize();
4646
disableForm();
4747
$.post('/start', options).fail(enableForm);

sample/SipCall/web/js/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
var session = OT.initSession(apiKey, sessionId);
2-
session.on("streamCreated", function (event) {
2+
session.on('streamCreated', function(event) {
33
var tokenData = event.stream.connection.data;
4-
if (tokenData && tokenData.includes("sip=true")) {
5-
var element = "sipPublisherContainer";
4+
if (tokenData && tokenData.includes('sip=true')) {
5+
var element = 'sipPublisherContainer';
66
} else {
7-
var element = "webrtcPublisherContainer";
7+
var element = 'webrtcPublisherContainer';
88
}
99
session.subscribe(event.stream, element, {
10-
insertMode: "append"
10+
insertMode: 'append'
1111
}, function(error) {
1212
if (error) {
1313
console.error('Failed to subscribe', error);
1414
}
1515
});
1616
})
17-
.connect(token, function (error) {
17+
.connect(token, function(error) {
1818
if (error) {
1919
console.error('Failed to connect', error);
2020
return;
2121
}
22-
session.publish("selfPublisherContainer", {
23-
insertMode: "append",
24-
height: "120px",
25-
width: "160px"
22+
session.publish('selfPublisherContainer', {
23+
insertMode: 'append',
24+
height: '120px',
25+
width: '160px'
2626
}, function(error) {
2727
if (error) {
2828
console.error('Failed to publish', error);
2929
}
3030
});
3131
});
32-
$('#startSip').click(function (event) {
32+
$('#startSip').click(function(event) {
3333
$.post('/sip/start', {sessionId: sessionId, apiKey: apiKey})
34-
.fail(function () {
34+
.fail(function() {
3535
console.log('Failed to start SIP call - sample app server returned error.');
3636
});
3737
});
38-
$('#stopSip').click(function (event) {
39-
OT.subscribers.where().forEach(function (subscriber) {
38+
$('#stopSip').click(function(event) {
39+
OT.subscribers.where().forEach(function(subscriber) {
4040
var connection = subscriber.stream.connection;
41-
if (connection.data && connection.data.includes("sip=true")) {
41+
if (connection.data && connection.data.includes('sip=true')) {
4242
session.forceDisconnect(connection.connectionId);
4343
}
4444
});

0 commit comments

Comments
 (0)