mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-07-02 04:11:44 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
3c4248c1c7 | |||
de834fcb80 | |||
baf2c2a35d | |||
522830a47d |
10
README.md
10
README.md
@ -22,8 +22,6 @@ Give this project a 🌟 if you like it. Thank you 🙏.
|
|||||||
> You should enable this feature even if you're on desktop.
|
> You should enable this feature even if you're on desktop.
|
||||||
> Use more bandwidth & battery.
|
> Use more bandwidth & battery.
|
||||||
> Comparison video with the setting ON & OFF: https://youtu.be/-9PuBJJSgR4
|
> Comparison video with the setting ON & OFF: https://youtu.be/-9PuBJJSgR4
|
||||||
> Disable if it causes crashes.
|
|
||||||
> This feature doesn't work on Kiwi Browser (unsupported codec).
|
|
||||||
- **Prefer IPv6 streaming server**
|
- **Prefer IPv6 streaming server**
|
||||||
> Might reduce latency
|
> Might reduce latency
|
||||||
- **Disable bandwidth checking**
|
- **Disable bandwidth checking**
|
||||||
@ -73,14 +71,16 @@ To update manually, just install the script again (you won't lose your settings)
|
|||||||
| Firefox | ✅ | ✅<sup>(1)</sup> | ❌ |
|
| Firefox | ✅ | ✅<sup>(1)</sup> | ❌ |
|
||||||
| Safari | ✅<sup>(2)</sup> | ➖ | ✅<sup>(3)</sup> |
|
| Safari | ✅<sup>(2)</sup> | ➖ | ✅<sup>(3)</sup> |
|
||||||
| [Hermit](https://hermit.chimbori.com) | ➖ | ⚠️<sup>(4)</sup> | ➖ |
|
| [Hermit](https://hermit.chimbori.com) | ➖ | ⚠️<sup>(4)</sup> | ➖ |
|
||||||
| Kiwi Browser | ➖ | ✅<sup>(5)</sup> | ➖ |
|
| Kiwi Browser | ➖ | ✅ | ➖ |
|
||||||
|
|
||||||
Don't see your browser in the table? If it supports Tampermonkey/Userscript then the answer is likely **"YES"**.
|
Don't see your browser in the table? If it supports Tampermonkey/Userscript then the answer is likely **"YES"**.
|
||||||
|
|
||||||
<sup>1</sup> Follow [this guide](https://support.mozilla.org/en-US/kb/find-and-install-add-ons-firefox-android) to install Tampermonkey on Firefox Android.
|
<sup>1</sup> Follow [this guide](https://support.mozilla.org/en-US/kb/find-and-install-add-ons-firefox-android) to install Tampermonkey on Firefox Android.
|
||||||
<sup>2, 3</sup> Requires [Userscripts app](https://apps.apple.com/us/app/userscripts/id1463298887) (free & open source).
|
<sup>2, 3</sup> Requires [Userscripts app](https://apps.apple.com/us/app/userscripts/id1463298887) (free & open source).
|
||||||
<sup>4</sup> NOT RECOMMENDED at the moment since its Userscript implementation is not working properly (see https://github.com/redphx/better-xcloud/issues/5 for full details). It's still my favorite app to play xCloud on because it's lightweight, supports Userscript (premium features, only $1.99) without having to install anything else. I built **Better xCloud** just so I could use it with Hermit.
|
<sup>4</sup> NOT RECOMMENDED at the moment since its Userscript implementation is not working properly (see https://github.com/redphx/better-xcloud/issues/5 for full details).
|
||||||
<sup>5</sup> The "Force high quality codec" is unsupported (causes crashes).
|
|
||||||
|
In general, at the moment the best Android browser to use **Better xCloud** with is **Kiwi Browser**. All features work, it means you can get 1080p stream + high quality codec profile (the best possible quality).
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
1. **Will I get banned for using this?**
|
1. **Will I get banned for using this?**
|
||||||
I think it's very unlikely that you'll get banned for using this. Most of the features only affect client-side, except for switching region of streaming server (you'll connect to another server instead of the default one). If you want to be safe just avoid using that. As always, use as your own risk.
|
I think it's very unlikely that you'll get banned for using this. Most of the features only affect client-side, except for switching region of streaming server (you'll connect to another server instead of the default one). If you want to be safe just avoid using that. As always, use as your own risk.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Better xCloud
|
// @name Better xCloud
|
||||||
// @namespace https://github.com/redphx
|
// @namespace https://github.com/redphx
|
||||||
// @version 1.4.1
|
// @version 1.4.2
|
||||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||||
// @author redphx
|
// @author redphx
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@ -13,7 +13,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const SCRIPT_VERSION = '1.4.1';
|
const SCRIPT_VERSION = '1.4.2';
|
||||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||||
|
|
||||||
const SERVER_REGIONS = {};
|
const SERVER_REGIONS = {};
|
||||||
@ -1021,35 +1021,20 @@ function patchRtcCodecs() {
|
|||||||
RTCRtpTransceiver.prototype.orgSetCodecPreferences = RTCRtpTransceiver.prototype.setCodecPreferences;
|
RTCRtpTransceiver.prototype.orgSetCodecPreferences = RTCRtpTransceiver.prototype.setCodecPreferences;
|
||||||
RTCRtpTransceiver.prototype.setCodecPreferences = function(codecs) {
|
RTCRtpTransceiver.prototype.setCodecPreferences = function(codecs) {
|
||||||
// Use the same codecs as desktop
|
// Use the same codecs as desktop
|
||||||
let profileSetting;
|
const newCodecs = codecs.slice();
|
||||||
for (let codec of codecs) {
|
newCodecs.forEach((codec, i) => {
|
||||||
if (codec.sdpFmtpLine.includes('profile-level-id=4d') || codec.sdpFmtpLine.includes('profile-level-id=42')) {
|
// Find high quality codecs
|
||||||
profileSetting = codec.sdpFmtpLine.slice(-4); // get the last 4 characters
|
if (codec.sdpFmtpLine && codec.sdpFmtpLine.includes('profile-level-id=4d')) {
|
||||||
break;
|
// Move it to the top of the array
|
||||||
}
|
newCodecs.splice(i, 1);
|
||||||
}
|
newCodecs.unshift(codec);
|
||||||
|
|
||||||
let newCodecs;
|
|
||||||
if (profileSetting) {
|
|
||||||
newCodecs = [
|
|
||||||
{
|
|
||||||
'clockRate': 90000,
|
|
||||||
'mimeType': 'video/H264',
|
|
||||||
'sdpFmtpLine': 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d' + profileSetting,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'clockRate': 90000,
|
|
||||||
'mimeType': 'video/H264',
|
|
||||||
'sdpFmtpLine': 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d' + profileSetting,
|
|
||||||
}
|
|
||||||
].concat(codecs);
|
|
||||||
} else {
|
|
||||||
newCodecs = codecs;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.orgSetCodecPreferences(newCodecs);
|
this.orgSetCodecPreferences(newCodecs);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
this.orgSetCodecPreferences(codecs);
|
this.orgSetCodecPreferences(codecs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user