mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-29 19:01:43 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
5479eeb66f | |||
a9eb70eaae | |||
0e2066e461 | |||
2ee2469a10 | |||
9056b5926f | |||
730799821b | |||
fed7d489f4 |
22
README.md
22
README.md
@ -2,7 +2,7 @@
|
||||
Improve [Xbox Cloud Gaming (xCloud)](https://www.xbox.com/play/) experience on web browser.
|
||||
The main target of this script is Android users, but it should work great on desktop too.
|
||||
|
||||
## Features:
|
||||
## Features
|
||||
|
||||
<img width="474" alt="image" src="https://github.com/redphx/better-xcloud/assets/96280/2793d404-3185-4c91-a500-dde362c661dd">
|
||||
|
||||
@ -18,7 +18,7 @@ The main target of this script is Android users, but it should work great on des
|
||||
- Disable social features (friends, chat...).
|
||||
- Disable xCloud analytics. The analytics contains statistics of your streaming session, so I'd recommend to allow analytics to help Xbox improve xCloud's experence in the future.
|
||||
|
||||
## How to use:
|
||||
## How to use
|
||||
1. Install [Tampermonkey extension](https://www.tampermonkey.net/) on suppported browsers. It's also available for Firefox on Android.
|
||||
2. Install **Better xCloud**:
|
||||
- [Directly on Github](https://github.com/redphx/better-xcloud/releases/latest/download/better-xcloud.user.js)
|
||||
@ -42,10 +42,20 @@ Other options (only do one of these):
|
||||
- Add ` 36102dd3-6953-45f6-8b48-031fb95e0e0d` to become a Logitech G Cloud device.
|
||||
- Add ` 0ed22b6f-b61d-41eb-810a-a1ed586a550b` to become a Razer Edge device.
|
||||
|
||||
## Tested on:
|
||||
- Chrome on macOS.
|
||||
- Firefox for Android with Tampermonkey add-on.
|
||||
- *(NOT RECOMMENDED at the moment since its Userscript implementation is not working properly)* [Hermit Browser](https://hermit.chimbori.com) on Android. It supports custom User-Agent and has built-in Userscript support (premium features, only $7.99) so you don't have to install anything else. I built **Better xCloud** just so I could use it with Hermit.
|
||||
## Compatibility
|
||||
✅ = confirmed to be working
|
||||
❓ = not yet tested
|
||||
❌ = not supported (mostly because of lacking Userscript/extension support)
|
||||
⚠️ = see custom notes
|
||||
| | Desktop | Android | iOS |
|
||||
|----------------------------------------|----------|------------------|-----|
|
||||
| Chrome | ✅ | ❌ | ❌ |
|
||||
| Firefox | ✅ | ✅ | ❌ |
|
||||
| Edge | ❓ | ❌ | ❌ |
|
||||
| Safari | ❓ | ❌ | ❓ |
|
||||
| [Hermit](https://hermit.chimbori.com) | ❌ | ⚠️<sup>(1)</sup> | ❌ |
|
||||
|
||||
<sup>1</sup> NOT RECOMMENDED at the moment since its Userscript implementation is not working properly. Non-network related features (skip splash video, video settings...) still work. It's still my favorite app to play xCloud on because it's lightweight, supports both custom User-Agent and Userscript (premium features, only $7.99) without having to install anything else. I built **Better xCloud** just so I could use it with Hermit.
|
||||
|
||||
## FAQ
|
||||
1. **Why is it an Userscript and not extension?**
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 1.1
|
||||
// @version 1.1.2
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@ -13,7 +13,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '1.1';
|
||||
const SCRIPT_VERSION = '1.1.2';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
const SERVER_REGIONS = {};
|
||||
@ -284,6 +284,9 @@ div[class*=NotFocusedDialog] {
|
||||
height: 0px !important;
|
||||
}
|
||||
|
||||
#game-stream video {
|
||||
visibility: hidden;
|
||||
}
|
||||
`;
|
||||
|
||||
// Reduce animations
|
||||
@ -307,6 +310,14 @@ div[class*=Grip-module__container] {
|
||||
button[class*=GripHandle-module__container][aria-expanded=true] div[class*=Grip-module__container] {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
button[class*=GripHandle-module__container][aria-expanded=false] {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
div[class*=StreamHUD-module__buttonsContainer] {
|
||||
padding: 0px !important;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
@ -741,8 +752,6 @@ function checkHeader() {
|
||||
if (!$button) {
|
||||
const $rightHeader = document.querySelector('#PageContent header div[class*=EdgewaterHeader-module__rightSectionSpacing]');
|
||||
injectSettingsButton($rightHeader);
|
||||
|
||||
updateVideoPlayerCss();
|
||||
}
|
||||
}
|
||||
|
||||
@ -776,10 +785,7 @@ function patchVideoApi() {
|
||||
|
||||
HTMLMediaElement.prototype.orgPlay = HTMLMediaElement.prototype.play;
|
||||
HTMLMediaElement.prototype.play = function() {
|
||||
if (!this.className.startsWith('XboxSplashVideo')) {
|
||||
return this.orgPlay.apply(this);
|
||||
}
|
||||
|
||||
if (this.className.startsWith('XboxSplashVideo')) {
|
||||
this.volume = 0;
|
||||
this.style.display = 'none';
|
||||
this.dispatchEvent(new Event('ended'));
|
||||
@ -787,6 +793,17 @@ function patchVideoApi() {
|
||||
return {
|
||||
catch: () => {},
|
||||
};
|
||||
}
|
||||
|
||||
// Show video player when it's ready
|
||||
let showFunc;
|
||||
showFunc = function() {
|
||||
this.style.visibility = 'visible';
|
||||
this.removeEventListener('playing', showFunc);
|
||||
}
|
||||
this.addEventListener('playing', showFunc);
|
||||
|
||||
return this.orgPlay.apply(this);
|
||||
};
|
||||
}
|
||||
|
||||
@ -837,6 +854,8 @@ interceptHttpRequests();
|
||||
|
||||
patchVideoApi();
|
||||
|
||||
updateVideoPlayerCss();
|
||||
|
||||
// Workaround for Hermit browser
|
||||
var onLoadTriggered = false;
|
||||
window.onload = () => {
|
||||
|
Reference in New Issue
Block a user