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 Jan 26, 2021
2 parents e07ef7c + b8c7491 commit 6bfc2b7
Show file tree
Hide file tree
Showing 42 changed files with 1,994 additions and 685 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ docs/
demo/
etc/
dist/
karma.conf.js
karma.conf.cjs
.travis.yml
tsconfig-base.json
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported |
| ------- | ------------------ |
| 0.14.x | :white_check_mark: |
| < 0.14.x | :x: |
| 0.19.x | :white_check_mark: |
| < 0.19.x | :x: |

## Reporting a Vulnerability

Expand Down
15 changes: 10 additions & 5 deletions demo/demo-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const simpleUserOptions: SimpleUserOptions = {
}
},
userAgentOptions: {
// logLevel: "debug",
displayName
}
};
Expand Down Expand Up @@ -98,11 +99,15 @@ connectButton.addEventListener("click", () => {
callButton.addEventListener("click", () => {
callButton.disabled = true;
hangupButton.disabled = true;
simpleUser.call(target).catch((error: Error) => {
console.error(`[${simpleUser.id}] failed to place call`);
console.error(error);
alert("Failed to place call.\n" + error);
});
simpleUser
.call(target, {
inviteWithoutSdp: false
})
.catch((error: Error) => {
console.error(`[${simpleUser.id}] failed to place call`);
console.error(error);
alert("Failed to place call.\n" + error);
});
});

// Add click listener to hangup button
Expand Down
1 change: 1 addition & 0 deletions demo/demo-2.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ button {
width: 40px;
top: 150px;
left: 10px;
transform: scaleX(-1);
}
138 changes: 76 additions & 62 deletions demo/demo-2.html
Original file line number Diff line number Diff line change
@@ -1,80 +1,94 @@
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>SIP.js Demo 2</title>
<link rel="stylesheet" type="text/css" href="./demo-2.css" />
</head>

<head>
<meta charset="utf-8" />
<title>SIP.js Demo 2</title>
<link rel="stylesheet" type="text/css" href="./demo-2.css">
</head>
<body>
<span><a href="index.html">&lt; Index</a></span>

<body>
<span><a href="index.html">&lt; Index</a></span>
<h2>Demo: Video Call - Between Two Users</h2>

<h2>Demo: Video Call - 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 video session</li>
<li>End the video session</li>
<li>Unregister</li>
<li>Disconnect</li>
</ol>
</div>
<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 video session</li>
<li>End the video session</li>
<li>Unregister</li>
<li>Disconnect</li>
</ol>
</div>

<div class="content">
<div id="alice" class="user">
<h4>Alice</h4>
<div class="video">
<video id="videoRemoteAlice" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
<div class="video-local">
<video id="videoLocalAlice" width="100%" muted="muted">
<div class="content">
<div id="alice" class="user">
<h4>Alice</h4>
<div class="video">
<video id="videoRemoteAlice" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
<div class="video-local">
<video id="videoLocalAlice" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
</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 Video Session</button></li>
<li><button id="endAlice" disabled>End Video Session</button></li>
<li><button id="unregisterAlice" disabled>Unregister</button></li>
<li><button id="disconnectAlice" disabled>Disconnect</button></li>
</ol>
<div>
<input type="checkbox" id="holdAlice" name="holdAlice" disabled />
<label for="holdAlice">Hold</label>
</div>
<div>
<input type="checkbox" id="muteAlice" name="muteAlice" disabled />
<label for="muteAlice">Mute</label>
</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 Video Session</button></li>
<li><button id="endAlice" disabled>End Video 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="video">
<video id="videoRemoteBob" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
<div class="video-local">
<video id="videoLocalBob" width="100%" muted="muted">
<div id="bob" class="user">
<h4>Bob</h4>
<div class="video">
<video id="videoRemoteBob" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
<div class="video-local">
<video id="videoLocalBob" width="100%" muted="muted">
<p>Your browser doesn't support HTML5 video.</p>
</video>
</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 Video Session</button></li>
<li><button id="endBob" disabled>End Video Session</button></li>
<li><button id="unregisterBob" disabled>Unregister</button></li>
<li><button id="disconnectBob" disabled>Disconnect</button></li>
</ol>
<div>
<input type="checkbox" id="holdBob" name="holdBob" disabled />
<label for="holdBob">Hold</label>
</div>
<div>
<input type="checkbox" id="muteBob" name="muteBob" disabled />
<label for="muteBob">Mute</label>
</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 Video Session</button></li>
<li><button id="endBob" disabled>End Video 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-2.js"
onerror="alert('To run this demo you must first build the library and demo source! See the README.')">
</script>

</body>

</html>
<script
src="./dist/demo-2.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 6bfc2b7

Please sign in to comment.