Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
sfu
Commits
d3655b89
Commit
d3655b89
authored
Jun 10, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle client-side errors during negotiation.
parent
03087197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
static/sfu.js
static/sfu.js
+17
-2
No files found.
static/sfu.js
View file @
d3655b89
...
...
@@ -736,7 +736,14 @@ async function gotAnswer(id, answer) {
let
c
=
up
[
id
];
if
(
!
c
)
throw
new
Error
(
'
unknown up stream
'
);
await
c
.
pc
.
setRemoteDescription
(
answer
);
try
{
await
c
.
pc
.
setRemoteDescription
(
answer
);
}
catch
(
e
)
{
console
.
error
(
e
);
displayError
(
e
);
delUpMedia
(
id
);
return
;
}
await
addIceCandidates
(
c
);
}
...
...
@@ -1117,7 +1124,15 @@ async function newUpStream() {
throw
new
Error
(
"
Couldn't create peer connection
"
);
up
[
id
]
=
new
Connection
(
id
,
pc
);
pc
.
onnegotiationneeded
=
e
=>
negotiate
(
id
);
pc
.
onnegotiationneeded
=
async
e
=>
{
try
{
await
negotiate
(
id
);
}
catch
(
e
)
{
console
.
error
(
e
);
displayError
(
e
);
delUpMedia
(
id
);
}
}
pc
.
onicecandidate
=
function
(
e
)
{
if
(
!
e
.
candidate
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment