mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 16:17:20 +02:00
Fix IPv6 feature not working
This commit is contained in:
parent
4676e42215
commit
ed54d1ed38
@ -356,10 +356,9 @@ function updateIceCandidates(candidates) {
|
|||||||
|
|
||||||
const newCandidates = [];
|
const newCandidates = [];
|
||||||
let order = 1;
|
let order = 1;
|
||||||
let priority = 100;
|
|
||||||
lst.forEach(item => {
|
lst.forEach(item => {
|
||||||
item.order = order;
|
item.order = order;
|
||||||
item.priority = priority;
|
item.priority = (order == 1) ? 100 : 1;
|
||||||
|
|
||||||
newCandidates.push({
|
newCandidates.push({
|
||||||
'candidate': `a=candidate:${item.order} 1 UDP ${item.priority} ${item.ip} ${item.the_rest}`,
|
'candidate': `a=candidate:${item.order} 1 UDP ${item.priority} ${item.ip} ${item.the_rest}`,
|
||||||
@ -369,7 +368,6 @@ function updateIceCandidates(candidates) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
++order;
|
++order;
|
||||||
--priority;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
newCandidates.push({
|
newCandidates.push({
|
||||||
@ -484,6 +482,7 @@ function interceptHttpRequests() {
|
|||||||
obj.exchangeResponse = JSON.stringify(exchangeResponse);
|
obj.exchangeResponse = JSON.stringify(exchangeResponse);
|
||||||
|
|
||||||
response.json = () => Promise.resolve(obj);
|
response.json = () => Promise.resolve(obj);
|
||||||
|
response.text = () => Promise.resolve(JSON.stringify(obj));
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user