Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
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
nexedi
galene
Commits
eb6ab8aa
Commit
eb6ab8aa
authored
May 24, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement workaround for older browsers that don't have transceivers.
parent
3959afb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
static/sfu.js
static/sfu.js
+16
-10
No files found.
static/sfu.js
View file @
eb6ab8aa
...
@@ -652,7 +652,7 @@ async function gotOffer(id, labels, offer) {
...
@@ -652,7 +652,7 @@ async function gotOffer(id, labels, offer) {
if
(
label
)
{
if
(
label
)
{
c
.
labels
[
e
.
track
.
id
]
=
label
;
c
.
labels
[
e
.
track
.
id
]
=
label
;
}
else
{
}
else
{
console
.
error
(
"
Couldn't find label for track
"
);
console
.
warn
(
"
Couldn't find label for track
"
);
}
}
c
.
stream
=
e
.
streams
[
0
];
c
.
stream
=
e
.
streams
[
0
];
setMedia
(
id
);
setMedia
(
id
);
...
@@ -1075,15 +1075,21 @@ async function negotiate(id) {
...
@@ -1075,15 +1075,21 @@ async function negotiate(id) {
await
c
.
pc
.
setLocalDescription
(
offer
);
await
c
.
pc
.
setLocalDescription
(
offer
);
// mids are not known until this point
// mids are not known until this point
c
.
pc
.
getTransceivers
().
forEach
(
t
=>
{
if
(
typeof
(
c
.
pc
.
getTransceivers
)
===
'
function
'
)
{
if
(
t
.
sender
&&
t
.
sender
.
track
)
{
c
.
pc
.
getTransceivers
().
forEach
(
t
=>
{
let
label
=
c
.
labels
[
t
.
sender
.
track
.
id
];
if
(
t
.
sender
&&
t
.
sender
.
track
)
{
if
(
label
)
let
label
=
c
.
labels
[
t
.
sender
.
track
.
id
];
c
.
labelsByMid
[
t
.
mid
]
=
label
;
if
(
label
)
else
c
.
labelsByMid
[
t
.
mid
]
=
label
;
console
.
error
(
"
Couldn't find label for track
"
);
else
}
console
.
warn
(
"
Couldn't find label for track
"
);
});
}
});
}
else
{
console
.
warn
(
'
getTransceivers undefined
'
);
displayWarning
(
'
getTransceivers undefined, please upgrade your browser
'
);
// let the server deal with the mess
}
send
({
send
({
type
:
'
offer
'
,
type
:
'
offer
'
,
...
...
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