Skip to content

Commit 6bfc2b7

Browse files
author
James Criscuolo
committed
Merge branch 'master' into release
2 parents e07ef7c + b8c7491 commit 6bfc2b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1994
-685
lines changed

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ docs/
66
demo/
77
etc/
88
dist/
9-
karma.conf.js
9+
karma.conf.cjs
1010
.travis.yml
11+
tsconfig-base.json

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7-
| 0.14.x | :white_check_mark: |
8-
| < 0.14.x | :x: |
7+
| 0.19.x | :white_check_mark: |
8+
| < 0.19.x | :x: |
99

1010
## Reporting a Vulnerability
1111

demo/demo-1.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const simpleUserOptions: SimpleUserOptions = {
6565
}
6666
},
6767
userAgentOptions: {
68+
// logLevel: "debug",
6869
displayName
6970
}
7071
};
@@ -98,11 +99,15 @@ connectButton.addEventListener("click", () => {
9899
callButton.addEventListener("click", () => {
99100
callButton.disabled = true;
100101
hangupButton.disabled = true;
101-
simpleUser.call(target).catch((error: Error) => {
102-
console.error(`[${simpleUser.id}] failed to place call`);
103-
console.error(error);
104-
alert("Failed to place call.\n" + error);
105-
});
102+
simpleUser
103+
.call(target, {
104+
inviteWithoutSdp: false
105+
})
106+
.catch((error: Error) => {
107+
console.error(`[${simpleUser.id}] failed to place call`);
108+
console.error(error);
109+
alert("Failed to place call.\n" + error);
110+
});
106111
});
107112

108113
// Add click listener to hangup button

demo/demo-2.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ button {
3030
width: 40px;
3131
top: 150px;
3232
left: 10px;
33+
transform: scaleX(-1);
3334
}

demo/demo-2.html

Lines changed: 76 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,94 @@
11
<!DOCTYPE html>
22

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

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

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

14-
<h2>Demo: Video Call - Between Two Users</h2>
15-
16-
<div>
17-
When this page was loaded, a <code>SimpleUser</code> was created for two users - Alice & Bob
18-
<ol>
19-
<li>Connect with SIP WebSocket Server</li>
20-
<li>Register user to receive calls</li>
21-
<li>Initiate a video session</li>
22-
<li>End the video session</li>
23-
<li>Unregister</li>
24-
<li>Disconnect</li>
25-
</ol>
26-
</div>
15+
<div>
16+
When this page was loaded, a <code>SimpleUser</code> was created for two users - Alice & Bob
17+
<ol>
18+
<li>Connect with SIP WebSocket Server</li>
19+
<li>Register user to receive calls</li>
20+
<li>Initiate a video session</li>
21+
<li>End the video session</li>
22+
<li>Unregister</li>
23+
<li>Disconnect</li>
24+
</ol>
25+
</div>
2726

28-
<div class="content">
29-
<div id="alice" class="user">
30-
<h4>Alice</h4>
31-
<div class="video">
32-
<video id="videoRemoteAlice" width="100%" muted="muted">
33-
<p>Your browser doesn't support HTML5 video.</p>
34-
</video>
35-
<div class="video-local">
36-
<video id="videoLocalAlice" width="100%" muted="muted">
27+
<div class="content">
28+
<div id="alice" class="user">
29+
<h4>Alice</h4>
30+
<div class="video">
31+
<video id="videoRemoteAlice" width="100%" muted="muted">
3732
<p>Your browser doesn't support HTML5 video.</p>
3833
</video>
34+
<div class="video-local">
35+
<video id="videoLocalAlice" width="100%" muted="muted">
36+
<p>Your browser doesn't support HTML5 video.</p>
37+
</video>
38+
</div>
39+
</div>
40+
<ol>
41+
<li><button id="connectAlice" disabled>Connect</button></li>
42+
<li><button id="registerAlice" disabled>Register User</button></li>
43+
<li><button id="beginAlice" disabled>Initiate Video Session</button></li>
44+
<li><button id="endAlice" disabled>End Video Session</button></li>
45+
<li><button id="unregisterAlice" disabled>Unregister</button></li>
46+
<li><button id="disconnectAlice" disabled>Disconnect</button></li>
47+
</ol>
48+
<div>
49+
<input type="checkbox" id="holdAlice" name="holdAlice" disabled />
50+
<label for="holdAlice">Hold</label>
51+
</div>
52+
<div>
53+
<input type="checkbox" id="muteAlice" name="muteAlice" disabled />
54+
<label for="muteAlice">Mute</label>
3955
</div>
4056
</div>
41-
<ol>
42-
<li><button id="connectAlice" disabled>Connect</button></li>
43-
<li><button id="registerAlice" disabled>Register User</button></li>
44-
<li><button id="beginAlice" disabled>Initiate Video Session</button></li>
45-
<li><button id="endAlice" disabled>End Video Session</button></li>
46-
<li><button id="unregisterAlice" disabled>Unregister</button></li>
47-
<li><button id="disconnectAlice" disabled>Disconnect</button></li>
48-
</ol>
49-
</div>
5057

51-
<div id="bob" class="user">
52-
<h4>Bob</h4>
53-
<div class="video">
54-
<video id="videoRemoteBob" width="100%" muted="muted">
55-
<p>Your browser doesn't support HTML5 video.</p>
56-
</video>
57-
<div class="video-local">
58-
<video id="videoLocalBob" width="100%" muted="muted">
58+
<div id="bob" class="user">
59+
<h4>Bob</h4>
60+
<div class="video">
61+
<video id="videoRemoteBob" width="100%" muted="muted">
5962
<p>Your browser doesn't support HTML5 video.</p>
6063
</video>
64+
<div class="video-local">
65+
<video id="videoLocalBob" width="100%" muted="muted">
66+
<p>Your browser doesn't support HTML5 video.</p>
67+
</video>
68+
</div>
69+
</div>
70+
<ol>
71+
<li><button id="connectBob" disabled>Connect</button></li>
72+
<li><button id="registerBob" disabled>Register User</button></li>
73+
<li><button id="beginBob" disabled>Initiate Video Session</button></li>
74+
<li><button id="endBob" disabled>End Video Session</button></li>
75+
<li><button id="unregisterBob" disabled>Unregister</button></li>
76+
<li><button id="disconnectBob" disabled>Disconnect</button></li>
77+
</ol>
78+
<div>
79+
<input type="checkbox" id="holdBob" name="holdBob" disabled />
80+
<label for="holdBob">Hold</label>
81+
</div>
82+
<div>
83+
<input type="checkbox" id="muteBob" name="muteBob" disabled />
84+
<label for="muteBob">Mute</label>
6185
</div>
6286
</div>
63-
<ol>
64-
<li><button id="connectBob" disabled>Connect</button></li>
65-
<li><button id="registerBob" disabled>Register User</button></li>
66-
<li><button id="beginBob" disabled>Initiate Video Session</button></li>
67-
<li><button id="endBob" disabled>End Video Session</button></li>
68-
<li><button id="unregisterBob" disabled>Unregister</button></li>
69-
<li><button id="disconnectBob" disabled>Disconnect</button></li>
70-
</ol>
7187
</div>
72-
</div>
73-
74-
<script src="./dist/demo-2.js"
75-
onerror="alert('To run this demo you must first build the library and demo source! See the README.')">
76-
</script>
77-
78-
</body>
7988

80-
</html>
89+
<script
90+
src="./dist/demo-2.js"
91+
onerror="alert('To run this demo you must first build the library and demo source! See the README.')"
92+
></script>
93+
</body>
94+
</html>

0 commit comments

Comments
 (0)