Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 26d9010

Browse files
authored
Merge pull request #107 from jianjunz/strict
Use JavaScript strict mode.
2 parents 8bcb6f8 + 9210737 commit 26d9010

File tree

16 files changed

+28
-2
lines changed

16 files changed

+28
-2
lines changed

src/samples/conference/public/scripts/rest-sample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// REST samples. It sends HTTP requests to sample server, and sample server sends requests to conference server.
66
// Both this file and sample server are samples.
7+
'use strict';
78
var send = function (method, path, body, onRes, host) {
89
var req = new XMLHttpRequest()
910
req.onreadystatechange = function () {

src/samples/p2p/js/sc.websocket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
56
/**
67
* @class SignalingChannel
78
* @classDesc Signaling module for Open WebRTC Toolkit P2P chat

src/samples/p2p/peercall.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ <h2>ScreenView</h2>
105105
<footer id="status"></footer>
106106
<div id="infoDiv"></div>
107107
<script type="text/javascript">
108+
'use strict';
108109
var isVideo = 1;
109110
var serverAddress = 'http://example.com'; // Please change example.com to signaling server's address.
110111
const signaling = new SignalingChannel();

src/sdk/base/export.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
6+
57
export * from './mediastream-factory.js';
68
export * from './stream.js';
79
export * from './mediaformat.js';

src/sdk/base/logger.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@
2828

2929
/* global console,window */
3030

31+
'use strict';
32+
3133
/*
3234
* API to write logs based on traditional logging mechanisms: debug, trace,
3335
* info, warning, error
3436
*/
3537
const Logger = (function() {
36-
'use strict';
3738
const DEBUG = 0;
3839
const TRACE = 1;
3940
const INFO = 2;

src/sdk/conference/export.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
6+
57
export {ConferenceClient} from './client.js';
68
export {SioSignaling} from './signaling.js';

src/sdk/export.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
6+
57
import * as base from './base/export.js';
68
import * as p2p from './p2p/export.js';
79
import * as conference from './conference/export.js';

src/sdk/p2p/error.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
6+
57
export const errors = {
68
// 2100-2999 for P2P errors
79
// 2100-2199 for connection errors

src/sdk/p2p/export.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
'use strict';
6+
57
export {default as P2PClient} from './p2pclient.js';
68
export {P2PError} from './error.js';

src/sdk/rest/API.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
// This file is borrowed from lynckia/licode with some modifications.
2828

29+
'use strict';
30+
2931
/*global require, CryptoJS, Buffer, url, http, https*/
3032
var Url = require("url");
3133

0 commit comments

Comments
 (0)