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
0eb1593b
Commit
0eb1593b
authored
Oct 06, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay adding tracks until connection is complete.
This avoids losing packets at the beginning of a connection.
parent
aa65164e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
rtpconn/webclient.go
rtpconn/webclient.go
+14
-2
No files found.
rtpconn/webclient.go
View file @
0eb1593b
...
...
@@ -520,9 +520,21 @@ func gotAnswer(c *webClient, id string, answer webrtc.SessionDescription) error
log
.
Printf
(
"ICE: %v"
,
err
)
}
for
_
,
t
:=
range
down
.
tracks
{
t
.
remote
.
AddLocal
(
t
)
add
:=
func
()
{
down
.
pc
.
OnConnectionStateChange
(
nil
)
for
_
,
t
:=
range
down
.
tracks
{
t
.
remote
.
AddLocal
(
t
)
}
}
down
.
pc
.
OnConnectionStateChange
(
func
(
state
webrtc
.
PeerConnectionState
)
{
if
state
==
webrtc
.
PeerConnectionStateConnected
{
add
()
}
})
if
down
.
pc
.
ConnectionState
()
==
webrtc
.
PeerConnectionStateConnected
{
add
()
}
return
nil
}
...
...
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