Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
James Criscuolo committed Jul 6, 2020
2 parents b9a1dc7 + 7c32961 commit 38e6dfd
Show file tree
Hide file tree
Showing 200 changed files with 7,088 additions and 3,677 deletions.
18 changes: 13 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"sourceType": "module",
"project": "./tsconfig-base.json"
},
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint", "tree-shaking"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand All @@ -18,6 +16,16 @@
],
"rules": {
"no-console": "error",
"@typescript-eslint/member-ordering": "error"
}
// "@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/member-ordering": "error",
"tree-shaking/no-side-effects-in-initialization": 2
},
"overrides": [
{
"files": ["./demo/**/*.ts", "./test/**/*.ts"],
"rules": {
"tree-shaking/no-side-effects-in-initialization": "off"
}
}
]
}
7 changes: 1 addition & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ src/
docs/
demo/
etc/
dist/sip-api.d.ts
dist/sip-api.js
dist/sip-api.min.js
dist/sip-core.d.ts
dist/sip-core.js
dist/sip-core.min.js
dist/
karma.conf.js
.travis.yml
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
test
src/grammar
src/platform/react
src/platform/web/modifiers
src/platform/web/session-description-handler
src/platform/web/session-description-handler-old
4 changes: 4 additions & 0 deletions demo/demo-2.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
button {
margin: 4px;
}

.content {
display: flex;
justify-content: center;
Expand Down
33 changes: 33 additions & 0 deletions demo/demo-3.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
button {
margin: 4px;
}

.content {
display: flex;
justify-content: center;
}

.user {
padding: 20px;
}

.message {
padding: 2px 4px;
margin: 0px;
}

.message-box-message {
width: 150px;
}

.message-box-received {
height: 200px;
width: 200px;
overflow-y: auto;
border: solid 1px;
margin-top: 10px;
}

.message-box-received.disabled {
border-color: lightgray;
}
71 changes: 71 additions & 0 deletions demo/demo-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta charset="utf-8" />
<title>SIP.js Demo 3</title>
<link rel="stylesheet" type="text/css" href="./demo-3.css">
</head>

<body>
<span><a href="index.html">&lt; Index</a></span>

<h2>Demo: Data Channel - Between Two Users</h2>

<div>
When this page was loaded, a <code>SimpleUser</code> was created for two users - Alice & Bob
<ol>
<li>Connect with SIP WebSocket Server</li>
<li>Register user to receive calls</li>
<li>Initiate a data session</li>
<li>End the data session</li>
<li>Unregister</li>
<li>Disconnect</li>
</ol>
</div>

<div class="content">
<div id="alice" class="user">
<h4>Alice</h4>
<div class="message-box">
<input class="message-box-message" type="text" id="messageAlice" placeholder="Message Bob" disabled>
<button id="sendAlice" disabled>Send</button>
<div class="message-box-received disabled" id="receiveAlice" disabled></div>
</div>
<ol>
<li><button id="connectAlice" disabled>Connect</button></li>
<li><button id="registerAlice" disabled>Register User</button></li>
<li><button id="beginAlice" disabled>Initiate Session</button></li>
<li><button id="endAlice" disabled>End Session</button></li>
<li><button id="unregisterAlice" disabled>Unregister</button></li>
<li><button id="disconnectAlice" disabled>Disconnect</button></li>
</ol>
</div>

<div id="bob" class="user">
<h4>Bob</h4>
<div class="message-box">
<input class="message-box-message" type="text" id="messageBob" placeholder="Message Alice" disabled>
<button id="sendBob" disabled>Send</button>
<div class="message-box-received disabled" id="receiveBob"></div>
</div>
<ol>
<li><button id="connectBob" disabled>Connect</button></li>
<li><button id="registerBob" disabled>Register User</button></li>
<li><button id="beginBob" disabled>Initiate Session</button></li>
<li><button id="endBob" disabled>End Session</button></li>
<li><button id="unregisterBob" disabled>Unregister</button></li>
<li><button id="disconnectBob" disabled>Disconnect</button></li>
</ol>
</div>

</div>

<script src="./dist/demo-3.js"
onerror="alert('To run this demo you must first build the library and demo source! See the README.')">
</script>

</body>

</html>
Loading

0 comments on commit 38e6dfd

Please sign in to comment.