Compare commits

...

119 Commits

Author SHA1 Message Date
e4d6afc2d2 Bump version to 3.0 2024-01-04 21:05:56 +07:00
7b59a8cd5e Add Mouse & Keyboard support (#194)
* Add initial support for MKB

* Refactor icons

* Enable native MKB support for some games

* Move Stream settings & stats buttons to Stream HUD bar

* Split stream settings into tabs

* Use bx-gone class to show/hide Settings sidebar

* Update translations

* Update Toast class

* Press F9 to toggle MKB feature

* Disable Gamepad Disconnected screen

* Change from F9 key to F8 key

* Reverse back to F9 key + disable "disableGamepadDisconnectedScreen" patch

* Fix "disableGamepadDisconnectedScreen" patch

* Add fade in/out animations for Toast

* Fix Settings tabs not showing

* Fix touch controller not showing sometimes

* Add basic remapping screen

* Update MKB layout

* Add edit/save states

* Add borders to highlight Quick Settings tabs

* Get key name from key code

* Move the Dots button to the beginning

* Disable non-working native MKB games

* Optimize Patcher class: only apply "playing" patches when needed

* Refactor renderMkbSettings() to MkbRemapper class

* Refactor the rendering process of MkbRemapper

* Implement new method to control analog stick using mouse

Heavily inspired by Yuzu's "Mouse panning" feature

* Update README.md

* Refactor setting elements

* Reduce button prompt's font size

* Render mouse settings

* Add a warning in MKB remapper

* Update preset's structure

* Disable "contextmenu" event of dialog & its overlay

* Fix bug in MkbPreset.convert()

* Detect scrolling events while binding

* Convert wheel events to button press

* Fix minor bugs in Stream settings

* Fix RT mapping

* Add setValue() method to SettingElement

* Update preset after binding new key

* Update preset after changing mouse's settings

* Update UI of mouse's settings

* Update style

* Fixed action buttons at the bottom

* Add support for "exactTicks" param to Number Stepper element

* Don't render first & last markers

* Add basic LocalDb class

* Allow switching between presets

* Enable/disable elements when editing preset

* Update translations

* Refactor code

* Define  "CE = createElement" globally

* Add createButton()

* Add icons to buttons

* Implement the "Cancel" button

* Implement the "Rename" button

* Add styling for disabled buttons

* Implement "New" & "Copy" buttons

* Implement "Delete" button

* Refactor code

* Fix exception when creating Default preset

* Set default name when copying preset

* Implement "Save" button

* Implement "Activate" button

* Implement switching preset data

* Pre-calculate mouse's sensitivities + fix not converting preset before using

* Fix mouse buttons not working

* Remove "not working" line

* Show "right-click-to-unbind" text

* Bug fixes

* Add ENABLE_NATIVE_MKB_BETA flag

* Update styling

* Add mention to Yuzu emu

* Pre-calculate mouse's sensitivities in MkbPreset.convert()

* Update translations

* Add donation link

* Update translations

* Add "Map mouse to" setting

* Fix styling

* Bug fixes

* Implement requestPointerLock()

* Hide pointerLock message when StreamMenu is being shown

* Fix bugs in Chrome

* Fix a bug causing Remote Play not working

* Remove "Disable bandwidth checking" feature as it's useless

* Update README.md

* Update styling

* Add URL to document

* Temporary disable the "Controller shortcuts" feature as it conflicts with the MKB feature

* Update translations

* Update README.md
2024-01-04 21:04:27 +07:00
b73109d9b4 Update README.md 2023-12-29 17:42:36 +07:00
e3b7365910 Update README.md 2023-12-21 09:04:53 +07:00
bdfb23257c Update README.md 2023-12-20 14:40:54 +07:00
0870065a81 Bump version to 2.1.2 2023-12-19 18:10:50 +07:00
e0f0617b12 Update translations 2023-12-19 18:10:30 +07:00
38623cc086 Fix Remote Play (#188)
* Try to fix remote play not working when not using local network

* Fix Server badge reporting incorrect info

* Refactor remote play requests in window.fetch

* Fix exceptions

* Stop overriding WebSocket class

* Fix not connecting to IPv6 server as expected
2023-12-19 18:08:14 +07:00
bbce49791f Bump version to 2.1.1 2023-12-14 17:52:40 +07:00
d719f0c2b5 Update translations 2023-12-14 17:52:19 +07:00
622057980d Update README.md 2023-12-14 17:50:47 +07:00
24d608bc3e Redesign Quick Settings sidebar (#186)
* Redesign Quick Settings bar

* Move stream stats settings to quick settings bar

* Add "for" attributes to labels

* Minor optimization

* Stop rendering Toast

* Don't render UI elements when not playing
2023-12-14 17:44:12 +07:00
f55344b4cb Update README.md 2023-12-14 09:41:00 +07:00
6139fb386b Update README.md 2023-12-14 09:14:37 +07:00
f7c46c5ef3 Update README.md 2023-12-14 08:03:27 +07:00
f5b495efa8 Update README.md 2023-12-13 08:33:21 +07:00
eb4803492e Update README.md 2023-12-13 08:07:39 +07:00
47ef7da37b Bump version to 2.1 2023-12-12 17:55:41 +07:00
63896469e2 Update README.md 2023-12-12 17:52:19 +07:00
4ab265e370 Controller & device vibration (#184)
* Test vibration

* Modify vibration patterns

* Try another vibration patterns

* Update vibration patterns

* Add setting to toggle device vibration

* Disable device vibration based on setting

* Bug fixes

* Test PWM

* Rename GamepadVibration to VibrationManager

* Add setting to toggle controller vibration

* Add vibration intensity setting

* Move Controller settings to the top

* Fix device vibration intensity

* No longer parse "delayMs" and "repeat"

* Fix device vibration intensity

* Disable vibration features on unsupported browsers

* Add "step" property to Vibration intensity slider

* Disable PWA prompt & Stream Gate dialog

* Update translations
2023-12-12 17:37:04 +07:00
584509a53d Improve IPv6 server detection 2023-12-09 11:09:08 +07:00
f3b9ebdb22 Bump version to 2.0.5 2023-12-08 07:43:30 +07:00
abd1aae57a Add "enableConsoleLogging" patch 2023-12-08 07:35:45 +07:00
ccdb944b99 Fix the Settings button not showing for some users 2023-12-08 07:23:44 +07:00
b4149e718b Bump version to 2.0.4 2023-12-06 20:06:41 +07:00
7c22685e95 Update README.md 2023-12-05 14:50:32 +07:00
ad98eb60e1 Only call eval() once per patch group 2023-12-05 06:38:35 +07:00
049e65429a Fix not applying patches correctly 2023-12-03 16:36:02 +07:00
a5b77ae8c0 Improve Patcher class 2023-12-03 10:38:10 +07:00
49550eed0a Add "enableXcloudLogger" patch 2023-12-02 17:31:51 +07:00
01861e0ca5 Bump version to 2.0.3 2023-12-02 11:27:37 +07:00
12d6fbd9c8 Check patches one by one to improve performance 2023-12-02 11:10:36 +07:00
1b0b15de76 Update README.md 2023-12-02 10:31:46 +07:00
5eba0f0ed7 Optimize Patcher class 2023-12-02 10:22:50 +07:00
0a851e5417 Rearrange patches to improve performance 2023-12-02 09:54:37 +07:00
d38e5e8812 Fix Ukrainian translation 2023-12-02 09:14:12 +07:00
69261a7f1d Add Ukranian translations 2023-12-01 17:12:45 +07:00
96b20dcb19 Fix Remote Play's stream didn't close properly 2023-12-01 06:24:58 +07:00
c5a4af9f49 Fix cloud gaming opened instead of Remote Play 2023-12-01 06:20:51 +07:00
3c62d1356f Update device info for Remote Play 2023-12-01 05:57:26 +07:00
78bfc09749 Fix Remote Play's resolution setting not applying correctly 2023-11-30 21:58:34 +07:00
f3bf7a0230 Update translations 2023-11-30 20:57:15 +07:00
c9a2d92c47 Disable idle warning while remote playing 2023-11-30 20:52:23 +07:00
5f18026f85 Update README.md 2023-11-28 20:42:03 +07:00
f4c299e730 Bump version to 2.0.2 2023-11-28 20:34:41 +07:00
baf7893769 Update translations 2023-11-28 20:31:08 +07:00
26ef306bab Fix Remote Play not working for free users (#171) 2023-11-28 20:22:39 +07:00
dc55b85772 Fix Remote Play connecting to the wrong console (#170) 2023-11-28 07:44:56 +07:00
bec3f771f2 Update README.md 2023-11-26 20:27:52 +07:00
7dc35a09c4 Bump version to 2.0.1 2023-11-26 20:13:45 +07:00
b72b881f2d Update README.md 2023-11-26 20:12:23 +07:00
4748d72d59 Update translations 2023-11-26 20:11:26 +07:00
95d4216824 Update translations 2023-11-26 16:00:54 +07:00
a0a453084a Add patches to block ApplicationInsights.track() and WebRTC stats collector 2023-11-26 15:57:16 +07:00
9b84690328 Fix a weird bug with Search box (#168) 2023-11-26 11:47:47 +07:00
1ffe5c218a Remove the "Controller Polling Rate" setting as it didn't work (#167) 2023-11-26 11:25:56 +07:00
1ea5f5031e Disable Remote Play feature by default & add a setting to enable it 2023-11-26 11:19:09 +07:00
526ceec0db Version 2.0 (#163)
* Update README.md

* Bump version to 2.0

* Bump version to 2.0
2023-11-25 17:17:14 +07:00
d54c3d50c4 Remote Play & Patcher (#162)
* Test remote play

* Add a link to dev-tools page

* Add Remote Play dialog

* Bug fixes

* Fix URL

* Fix header

* Path xHome domain

* Remote Remote Play config from window.location while playing

* Update style of the Remote Play button

* Add dialog overlay

* Hide Settings when opening the Remote Play dialog

* Update styles

* Path /direct-connect link

* Fix bind() monkey-patching

* Stop patching when it's done

* Fix exception with GAME_TITLE_ID

* Add resolution setting

* Add Patcher class

* Stop storing Remote Play config in location.hash

* Apply resolution

* Display state's label

* Fix IPv6

* Update translations

* Move Patcher class to the top

* Add "disableTelemetry" and "disableTrackEvent" patches

* Add Layout setting

* Add setting to adjust controller polling rate

* Add Mouse & Keyboard support

* Add Italian translations
2023-11-25 16:47:11 +07:00
f306cb5eee Bump version to 1.19 2023-11-19 16:22:27 +07:00
c1acb689fe Bump version to 1.19 2023-11-19 16:22:03 +07:00
5837e30afc Update README.md 2023-11-19 16:21:31 +07:00
9b955aabb9 Controller shortcuts (#157)
* Basic code for GamepadHandler

* Take screenshot using Home + RB

* Enable shortcuts using setting

* Only poll gamepad when playing

* Toogle stats using Home + Select

* Add basic Toast class

* Update translations
2023-11-19 16:09:41 +07:00
d73f91ed5f Bump version to 1.18.2 2023-10-27 17:44:29 +07:00
b918fadaab Bump version to 1.18.2 2023-10-27 17:44:03 +07:00
b79775839b Update README.md 2023-10-27 17:37:19 +07:00
d3e0ba9d9f Change "Target Resolution > Auto" to "Default" 2023-10-27 17:26:33 +07:00
e6e8297632 Clear touch controller's style after switching game 2023-10-27 17:20:06 +07:00
e94fb28266 Fix TitlesInfo 2023-10-27 17:00:25 +07:00
11e953c382 Bump version to 1.18.1 2023-10-26 20:06:46 +07:00
4845ea6994 Bump version to 1.18.1 2023-10-26 20:06:27 +07:00
0f0072bcb0 Update README.md 2023-10-26 20:05:57 +07:00
85d156f6b2 Clear Application Insights buffers periodically 2023-10-26 15:43:33 +07:00
8d24494b02 Add French & Japanese translations 2023-10-26 15:28:13 +07:00
9d1bca99aa Clear Analytics Insight buffers no page load 2023-10-26 15:14:35 +07:00
a8cf0896c5 Loading screen: use Image_Tile when Image_Hero is not available 2023-10-26 15:02:32 +07:00
4767df442e Update translations 2023-10-15 17:28:11 +07:00
8314074957 Update README.md 2023-10-15 17:12:57 +07:00
6ffa75a4ec Bump version to 1.18 2023-10-15 17:09:47 +07:00
7813e6f432 Bump version to 1.18 2023-10-15 17:09:32 +07:00
75d9639c01 Hide the "Play with friends" section when social features are disabled 2023-10-15 16:23:51 +07:00
fb80c3662a Add option to disable post-stream feedback dialog 2023-10-15 16:07:59 +07:00
9e1d8866ce Fix minor bugs in StreamMenu 2023-10-15 14:23:08 +07:00
28438c7c9e Add German translation 2023-10-10 09:40:05 +07:00
0cb0901ae2 Add Polish and Spanish translations 2023-10-05 09:27:40 +07:00
9d7c537eaa Update README.md 2023-10-03 16:53:43 +07:00
eccd306d03 Bump version to 1.17.2 2023-10-03 16:51:45 +07:00
e15afd2396 Bump version to 1.17.2 2023-10-03 16:51:25 +07:00
f0dbc72987 Add Korean translation 2023-10-03 16:03:49 +07:00
25bf6c209d Merge branch 'main' of https://github.com/redphx/better-xcloud 2023-10-03 09:55:14 +07:00
f229dbdbe4 Update README.md 2023-10-02 21:46:35 +07:00
e845c902b2 Fix Stats settings dialog being too big on small screens 2023-10-02 17:27:37 +07:00
c424c6f94b Add Chinese (Simplified) translation 2023-09-29 08:21:29 +07:00
1619fb2b26 Bump version to 1.17.1 2023-09-25 20:06:44 +07:00
d72641ba77 Bump version to 1.17.1 2023-09-25 20:06:22 +07:00
7c3f00f277 Update README.md 2023-09-25 20:05:50 +07:00
9bd0ee9097 Fix volume booster feature (#141)
* Trying to fix the audio problem with volume booster

* Add an option to disable volume control feature

* Update translations
2023-09-25 19:55:36 +07:00
a9bb977311 Update TR translation 2023-09-21 07:45:44 +07:00
3e0653fadf Add RU & TR to language list 2023-09-20 07:09:42 +07:00
36f6b04ad9 Add TR translation 2023-09-20 07:08:13 +07:00
60b70e259b Add RU translation 2023-09-20 07:06:12 +07:00
c50e0d6aff Update BR translation 2023-09-20 07:03:40 +07:00
a3fd3c9ebe Update README.md 2023-09-18 09:26:06 +07:00
c47caea65e Bump version to 1.17 2023-09-18 08:12:57 +07:00
6f540cca7a Bump version to 1.17 2023-09-18 08:12:35 +07:00
7a202ba8a7 Disable "Visual quality" setting on unsupported browsers 2023-09-18 08:10:52 +07:00
1f787b7888 Update README.md 2023-09-18 07:56:44 +07:00
0cc96135c9 Support more languages (#134)
* Define CSS variables

* Shorten CSS prefix "better-xcloud-" to "bx-"

* Move Safari's workaround code to the end of the script

* Add setting to change Better xCloud's language

* Support Vietnamese language

* Use the same language as browser

* Minor fixes

* Add Portuguese (Brazilian)

* Update BR translation

* Adjust CSS of Settings' reload button

* Reload the page after changing language

* Fix setting locale on first run

* Replace "Force high-quality codec" option with "Visual quality"

* Add Italian translation

* Update texts

* Deprecate "Prefer high-quality codec" setting

* Show stat's abbr. in slection box

* Reduce border size in stats bar from 2px to 1px

* Remove unused texts

* Remove Italian translation (because it's unfinised) + update Brazillian + Vietnamese translations
2023-09-18 07:43:03 +07:00
ed2fb13e17 Create MouseHoldEvent 2023-09-13 17:40:54 +07:00
b91474c20b Hide Stream Settings dialog when opening Stream Menu 2023-09-13 17:18:50 +07:00
18eec8b8da Update CSS selectors for REDUCE_ANIMATIONS 2023-09-13 17:00:00 +07:00
949a180047 Update README.md 2023-09-13 16:54:29 +07:00
c9a67cf6b7 Create FUNDING.yml 2023-09-13 16:48:12 +07:00
b469ba4867 Update README.md 2023-09-11 14:40:49 +07:00
a0d0d6e1e6 Update README.md 2023-09-10 17:51:42 +07:00
cc466ff2ac Bump version to 1.16 2023-09-10 17:16:11 +07:00
b1bfe96935 Bump version to 1.16 2023-09-10 17:15:47 +07:00
241be49d09 Update README.md 2023-09-10 17:15:23 +07:00
7c48b7e6fb Volume booster (#125)
* Move Video settings box from bottom to the right side

* Rename "Video Settings" to "Stream Settings"

* Volume booster

* Fix volume booster not working

* Typo

* Fix not working in Kiwi

* Show input range

* Update monkey patching method for AudioContext

* Refactor Preferences

* Add tick markers

* Add Audio & Video headers

* Reduce stats bar size

* Show warning when Clarity Boost mode is ON

* Increase max volume to 600

* Try to fix audio problem on iOS/iPadOS

* Pause <audio>

* Fix crashing when enabling touch controller

* Fix touch controller not working

* Fix volume booster not working on iOS/iPadOS
2023-09-10 17:04:23 +07:00
4 changed files with 7246 additions and 1081 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
ko_fi: redphx

289
README.md
View File

@ -1,6 +1,12 @@
# Better xCloud # Better xCloud
Improve [Xbox Cloud Gaming (xCloud)](https://www.xbox.com/play/) experience on web browser. Improve Xbox Cloud Gaming (xCloud) experience on [xbox.com/play](https://www.xbox.com/play). It also allows you to use Remote Play on the xCloud website.
The main target of this script is mobile users, but it should work great on desktop too.
**Supported platforms:**
- Windows
- macOS
- Linux, SteamOS (including Steam Deck)
- Android, Android TV (including Meta Quest VR Headsets)
- iOS, iPadOS
This script makes me spend more time with xCloud, and I hope the same thing happens to you. This script makes me spend more time with xCloud, and I hope the same thing happens to you.
If you like this project please give it a 🌟. Thank you 🙏. If you like this project please give it a 🌟. Thank you 🙏.
@ -9,282 +15,59 @@ If you like this project please give it a 🌟. Thank you 🙏.
[![Total downloads](https://img.shields.io/github/downloads/redphx/better-xcloud/total?color=%23e15f2c)](https://github.com/redphx/better-xcloud/releases) [![Total downloads](https://img.shields.io/github/downloads/redphx/better-xcloud/total?color=%23e15f2c)](https://github.com/redphx/better-xcloud/releases)
[![Total stars](https://img.shields.io/github/stars/redphx/better-xcloud?color=%23cca400)](https://github.com/redphx/better-xcloud/stargazers) [![Total stars](https://img.shields.io/github/stars/redphx/better-xcloud?color=%23cca400)](https://github.com/redphx/better-xcloud/stargazers)
## Full documentations
For the full details please visit: https://better-xcloud.github.io
## Table of Contents ## Table of Contents
- [**Features**](#features)
- [**How to install**](#how-to-install) - [**How to install**](#how-to-install)
- [**Compatibility**](#compatibility) - [**Features**](#features)
- [**Stream stats**](#stream-stats)
- [**Capture screenshot**](#capture-screenshot)
- [**FAQ**](#faq)
- [**Donation**](#donation) - [**Donation**](#donation)
- [**Acknowledgements**](#acknowledgements) - [**Acknowledgements**](#acknowledgements)
- [**Disclaimers**](#disclaimers) - [**Disclaimers**](#disclaimers)
## How to install
Visit [this page](https://better-xcloud.github.io/browsers) to know how to install Better xCloud on your device.
## Features ## Features
<img width="400" alt="Settings UI" src="https://github.com/redphx/better-xcloud/assets/96280/0eedde97-74c7-44df-bc89-2ebf8edb6e2c"> <img width="400" alt="Settings UI" src="https://github.com/redphx/better-xcloud/assets/96280/ca38b3fa-1e89-4b37-937c-a6796c07cdf1">
<br> <br>
<img width="600" alt="Stream HUD" src="https://github.com/redphx/better-xcloud/assets/96280/e30f6514-13ca-41c6-bff2-979573cff956"> <img width="400" alt="Remote Play dialog" src="https://github.com/redphx/better-xcloud/assets/96280/daf7f698-a228-4f9c-8f23-9669e061a64c">
<br> <br>
<img width="600" alt="Video settings" src="https://github.com/redphx/better-xcloud/assets/96280/20756157-917b-4a43-9985-df7bfdc24aa3"> <img width="600" alt="Stream HUD" src="https://github.com/redphx/better-xcloud/assets/96280/51bdb96c-79ab-402f-902a-a9e6229973b2">
<br>
<img width="600" alt="Stream settings" src="https://github.com/redphx/better-xcloud/assets/96280/ed513cb3-6e6c-4e8e-9e06-c62e71e41c90">
<br>
<img width="600" alt="Remapper" src="https://github.com/redphx/better-xcloud/assets/96280/f2e2bc51-f673-4b24-b127-c7169b86462b">
&nbsp; &nbsp;
**Demo video:** [https://youtu.be/oDr5Eddp55E ](https://youtu.be/AYb-EUcz72U) **Demo video:** [https://youtu.be/oDr5Eddp55E ](https://youtu.be/AYb-EUcz72U)
- **🔥 Totally free and open-source**
- **🔥 Improve visual quality of the stream** - **🔥 Allow playing with [Mouse & Keyboard](https://better-xcloud.github.io/mouse-and-keyboard)**
- **🔥 Enable [Remote Play](https://better-xcloud.github.io/remote-play) support**
> 1080p resolution and can stream Xbox 360 games.
- **🔥 [Improve visual quality](https://better-xcloud.github.io/ingame-features/#improve-streams-clarity) of the stream**
> Similar to (but not as good as) the "Clarity Boost" of xCloud on Edge browser. [Demo video](https://youtu.be/ZhW2choAHUs). > Similar to (but not as good as) the "Clarity Boost" of xCloud on Edge browser. [Demo video](https://youtu.be/ZhW2choAHUs).
- **🔥 Show stream stats** - **🔥 Show [Stream stats](https://better-xcloud.github.io/stream-stats)**
> Check [Stream stats section](#stream-stats) for more info. - **🔥 [Screenshot capture](https://better-xcloud.github.io/screenshot-capture)**
- **🔥 Capture screenshot** - **🔥 [Touch controller](https://better-xcloud.github.io/features/#touch-controller)**
> Exclusive to **Better xCloud**. Check the [**Capture screenshot** section](#capture-screenshot) for more info.
- **🔥 Hold the "Quit game" button for one second to refresh the stream**
> Sometimes you can fix the bad connection to the stream simply by refreshing the page.
> Useful on mobile where the pull-to-refresh feature doesn't work while playing.
- **🔥 Touch controller**
> Enable touch controller support for all games. > Enable touch controller support for all games.
- [And more...](https://better-xcloud.github.io/features/)
### Server
- **Set the region of streaming server**
> Connect to another server instead of the default one.
> It's not using VPN.
> ["Can I get banned for using this?"](#faq)
- **Preferred game's language**
> If the game doesn't support this language, it will use the same language as xCloud's website.
- **Prefer IPv6 server**
> Might reduce latency.
### Stream
- **Set target resolution**
> By default you only get 1080p stream when playing on desktop.
> This feature can give you 1080p stream even on mobile, without having to change User-Agent.
- **Force high-quality codec (if supported)<sup>(\*)</sup>**
> Force xCloud to use the best streaming codec profile (same as desktop & TV) if possible. You don't have to change User-Agent anymore.
> You should enable this feature even if you're on desktop.
> Not available for some browsers (Firefox, Safari...).
> Use more bandwidth & battery.
> Comparison video with the setting ON & OFF: https://youtu.be/-9PuBJJSgR4
- **Disable bandwidth checking**
> xCloud won't warn about slow connection speed.
- **Enable microphone on game launch**
> Automatically enable the mic when starting to play a game.
- **Hide mouse cursor on idle**
> Hide the mouse cursor after 3 seconds of not moving.
### 🔥 Touch controller
- **Availability**
> Only for devices with touch support (Android/iOS/iPadOS/...). Using "Desktop mode" in mobile browsers also disables this feature.
> - **Default**: nothing change.
> - **Off**: stop the touch controller from showing when touching the screen. Useful when you play on a device with a built-in controller like Logitech G Cloud, Steam Deck, etc.
> - **All games**: enable touch controller support for all games. Games with custom layout won't be affected.
> Double-tap anywhere at the bottom of the screen to show/hide the controller. Useful when you're viewing cutscenes.
> &nbsp;
> ![toggle-touch-controller](https://github.com/redphx/better-xcloud/assets/96280/8b9c7091-529a-45ae-8b45-73e61531ecc8)
- **Button styles**
> - Default
> - Muted
> - All white (only for standard/default controller)
> &nbsp;
> <img width="400" alt="Button styles" src="https://github.com/redphx/better-xcloud/assets/96280/2bfef2b3-6712-4924-b067-c2312f8c8062">
### Loading screen
- **Show game art**
> Replace the black background with game art if it's available.
- **Show the estimated wait time**
> The time is estimated by the server.
> It's not 100% correct: you might get in the game sooner or later.
> Check [#51](https://github.com/redphx/better-xcloud/issues/51) for more info.
- **Show/hide the rocket animation**
> Always show/Hide when queuing/Always hide.
> Hide this animation might save some battery life while queuing.
<img height="300" alt="Loading screen" src="https://github.com/redphx/better-xcloud/assets/96280/46074b14-1abb-466d-a859-d46ad4dac2fd">
### UI
- **Simplify Stream's menu**
> Hide the labels of the menu buttons.
- **Skip Xbox splash video**
> Save 3 seconds.
- **Hide System menu's icon**
> You can still click on it, but it doesn't block the screen anymore.
- **Reduce UI animations**
> Disable `transition` CSS property in some elements. The smooth scrolling cannot be disabled.
### Other
- **Disable social features**
> Features like friends, chat... Disable these will make the page load faster.
- **Disable xCloud analytics**
> The analytics contains statistics of your streaming session, so I'd recommend allowing analytics to help Xbox improve xCloud's experience in the future.
### Stream's video features
- **🔥 Improve stream's clarity**
> Similar to (but not as good as) the "Clarity Boost" of xCloud on Edge browser. [Demo video](https://youtu.be/ZhW2choAHUs).
> Also known as poor man's "Clarity Boost".
> Affects the stream's performance, uses more battery, and may causes frames to drop (especially on lower-end devices).
> Works with Chrome/Chromium browsers.
> Doesn't work with Safari.
> &nbsp;
> ![clarity](https://github.com/redphx/better-xcloud/assets/96280/ed63bbb0-fcbf-43e2-8e51-ac2733e697b8)
> *(click to enlarge)*
- **Change video's ratio**
> Useful when you don't have a 16:9 screen
- **Adjust video filters**
> Brightness/Contrast/Saturation.
> ⚠️ These features don't work when xCloud's "Clarity Boost" feature is ON ([#64](https://github.com/redphx/better-xcloud/issues/64)).
- **Display stream's statuses**
> Region/Server/Codecs/Resolution...
> Current playtime of the session.
> Current battery level. Not working on [some browsers](https://caniuse.com/battery-status).
> Estimated total data sent/received.
### Advanced features
- **Change User-Agent**
> Useful when you're using unsupported browsers.
> This setting only affects xCloud, and it doesn't change browser's global User-Agent.
> 📝 If you get 404 error after using this feature, try refreshing the page a few times. See [#34](https://github.com/redphx/better-xcloud/issues/34).
- **Hide footer and other UI elements**
<sup>(\*)</sup> By default (for compatibility reasons) xCloud only uses high quality codec profile when you use Tizen TV or Chrome/Edge/Chromium browser on Chrome/MacOS. Enable this setting will give you the best experience no matter what platform & browser you're on.
## How to install
1. Install [Tampermonkey extension](https://www.tampermonkey.net/) on suppported browsers. For Safari, use the [Userscripts extension](https://apps.apple.com/us/app/userscripts/id1463298887) (check [this page](https://github.com/redphx/better-xcloud/wiki/Using-with-Safari) before using).
2. Install **Better xCloud**:
- [Stable version](https://github.com/redphx/better-xcloud/releases/latest/download/better-xcloud.user.js)
<!-- - [Dev version](https://github.com/redphx/better-xcloud/raw/main/better-xcloud.user.js)-->
I only distribute **Better xCloud** on GitHub, *DO NOT* download it on other websites or from unknown sources.
3. Refresh [xCloud web page](https://www.xbox.com/play/).
4. Click on the new "SERVER NAME" button next to your profile picture to adjust settings.
5. Don't forget to enable auto updating for the script in Tampermonkey.
To update manually, just install the script again (you won't lose your settings).
⚠️⚠️⚠️ If you're using Kiwi Browser on Android, make sure to follow the steps correctly and install the script with Tampermonkey (not installing it as an extension), or else it won't work.
### Tutorial videos
If you still have trouble installing **Better xCloud**, you can follow one of these tutorial videos:
- 🇧🇷 [Tudo isso agora tem no xCloud!! (ChipTec)](https://youtu.be/zS8Zy0mYIbU?t=40)
- 🇫🇷 [#Tuto Xbox Cloud Gaming : Ecran ultra large et adieu les bandes noires sur smartphone (Cloud Gaming France)](https://www.youtube.com/watch?v=5U05KoTdDHs)
## Compatibility
✅ = confirmed to be working
❓ = not yet tested
❌ = not supported (mostly because of lacking Userscript/extension support)
= unavailable
⚠️ = see custom notes
| | Desktop | Android/Android TV | iOS |
|-----------------------------------------|:-----------------|:-------------------|:----------------|
| Chrome/Edge/Chromium variants | ✅ | ❌ | ❌ |
| Firefox | ✅ | ⚠️<sup>(1)</sup> | ❌ |
| Safari | ✅<sup>(2)</sup> | | ✅<sup>(3)</sup> |
| [Hermit](https://hermit.chimbori.com) | | ⚠️<sup>(4)</sup> | |
| [Kiwi Browser](https://kiwibrowser.com) | | ✅ | |
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. Its Gamepad API doesn't work properly so it might not recognize your controller.
<sup>2, 3</sup> Requires [Userscripts app](https://apps.apple.com/us/app/userscripts/id1463298887) (free & open-source). Check [this page](https://github.com/redphx/better-xcloud/wiki/Using-with-Safari) before using.
<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).
---
- **Kiwi Browser** is the best choice on Android. All features work, it means you can get 1080p stream + high-quality codec profile (the best possible quality).
- **Better xCloud** also works on Android TV, but you'll have to sideload the browser APK and need a Bluetooth mouse if you want to interact with the Settings.
## Stream stats
![stats](https://github.com/redphx/better-xcloud/assets/96280/736548db-316d-4bb3-a0f8-467766ae810b)
<img width="500" alt="Stream stats" src="https://github.com/redphx/better-xcloud/assets/96280/142625ea-20ab-4392-a111-0c5bc08bae09">
- While playing > `...` > `Stream Stats`.
- Double-click on the stats bar to show the Settings dialog.
- This bar is updated every second.
- **Quick glance** feature: only show the stats bar when the System menu is expanded. The 👀 emoji at the beginning indicates that the stats bar is in the quick glance mode.
- ⚠️ Using **Better xCloud** or showing the stats bar also affects the performance of the stream.
| Abbr. | Full name | Explain |
|------:|:-------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|
| PING | Ping | The number of seconds it takes for data to be sent from your device to the server and back over (the correct term is "Round Trip Time") |
| FPS | Frames per Seconds | The number of decoded frames in the last second of the stream (may not be the same as the FPS of the game) |
| DT | Decode Time | The average time it took to decode one frame in the last second (bugged on Android [#26](https://github.com/redphx/better-xcloud/issues/26)) |
| BR | Bitrate | The amount of data the server sent to your device in the last second |
| PL | Packets Lost | The total number of packets lost |
| FL | Frames Lost | The total number of frames dropped prior to decode or dropped because the frame missed its display deadline |
This info is provided by WebRTC API. You can use browser's built-in tool to see more info:
- Chrome/Edge/Chromium variants: `chrome://webrtc-internals`
- Firefox: `about:webrtc`
Colors:
- Red = Bad
- Yellow = Okay
- Green = Good
- White = Great
⚠️ Having this info on all the time will drain the battery faster, so I'd recommend only using it when having network problems.
## Capture screenshot
- This feature is only available in **Better xCloud**.
- Works on both desktop & mobile, but it was designed for mobile users.
- It's client-side only.
- It captures the current frame of the stream and saves it to a file. That means you won't get the raw quality like when you play on a console, but it's still better than using the built-in screenshot feature on your phone.
- Screenshot's resolution & quality depend on the quality of the stream at the moment.
- Screenshot doesn't include touch UI, notification bar... only the gameplay.
- There might be a slight delay.
- ⚠️ It's not possible to map the Share/Screenshot button on your controller to this feature.
### How to capture screenshot
1. Enable this feature in the Settings.
2. Play a game.
3. Tap once at the bottom left/right (depending on your setting) to show the Screenshot button.
4. Tap on that button to capture screenshot.
5. Screenshot will be saved by the browser.
6. You can double-tap that corner to capture screenshot.
![screenshot](https://github.com/redphx/better-xcloud/assets/96280/b277193e-df94-4d72-b75c-3f728c984974)
## FAQ
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 it as your own risk.
2. **Why is it an Userscript and not an extension?**
It's because not many browsers on Android support installing extensions (and not all extensions can be installed).
3. **Why doesn't the xCloud website implement *this* or *that* feature from Better xCloud?**
Think of this project as an unofficial beta version of xCloud.
- **Better xCloud** doesn't have to worry about the compatibility much: if it doesn't work on this browser, it can just suggest you switch to another one. xCloud can't do the same.
- On the xCloud's side, they have a lot more users and devices to support, so it's more difficult for them to implement a new feature.
- Also, it's not easy to explain some of the features of **Better xCloud** to normal xCloud users.
4. **Can I use this with the Xbox Android app?**
No, you can't. You'll have to modify the app.
5. **Will it be able to enable the "Clarity Boost" feature on non-Edge browsers?**
~~No. The "Clarity Boost" feature uses an exclusive API (`Video.msVideoProcessing`) that's only available on Edge browser for desktop at the moment.~~
Fake news! This feature has been implemented in **Better xCloud** since version 1.12, but the original "Clarity Boost" still perform better.
7. **Will it be able to request a lower FPS or increase the maximum bitrate (15Mbps) of the stream?**
Sorry, no. The server decides all these settings.
8. **What's the meaning behind the name "Better xCloud"?**
It's a reference to an Userscript called "better360" that I created many years ago. I regret not choosing the name "xCloud Enhancement Suite", or XES for short.
## Donation ## Donation
I'm doing this for fun, so you don't have to donate anything. You're already supporting me by using this script. Save that money toward your Xbox Game Pass Ultimate subscription 😄. If you think this project is useful and want to support future developments, please consider making a donate via [my Ko-fi page](https://ko-fi.com/redphx).
Or you can give this project a star, that's also helpful.
## User-Agent Thank you.
Moved to [wiki](https://github.com/redphx/better-xcloud/wiki/UserAgent).
## Acknowledgements ## Acknowledgements
- The mouse controlling feature is heavily inspired by the "Mouse spinning" feature in [Yuzu emulator](https://github.com/yuzu-emu/yuzu-mainline)
- [n-thumann/xbox-cloud-server-selector](https://github.com/n-thumann/xbox-cloud-server-selector) for the idea of IPv6 feature - [n-thumann/xbox-cloud-server-selector](https://github.com/n-thumann/xbox-cloud-server-selector) for the idea of IPv6 feature
- Icons by [Phosphor Icons](https://phosphoricons.com) - Icons by [Phosphor Icons](https://phosphoricons.com)
- [PromptFont](https://shinmera.com/promptfont) by Yukari "Shinmera" Hafner
## Disclaimers ## Disclaimers
- Use as it your own risk. - Use it at your own risk.
- This project is not affiliated with Xbox in any way. All Xbox logos/icons/trademarks are copyright of their respective owners. - This project is not affiliated with Xbox in any way. All Xbox logos/icons/trademarks are copyright of their respective owners.

View File

@ -1,5 +1,5 @@
// ==UserScript== // ==UserScript==
// @name Better xCloud // @name Better xCloud
// @namespace https://github.com/redphx // @namespace https://github.com/redphx
// @version 1.15.1 // @version 3.0
// ==/UserScript== // ==/UserScript==

File diff suppressed because it is too large Load Diff