mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 12:56:42 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20caac4821 | ||
![]() |
dac9823d5b | ||
![]() |
bcdabbf1b9 | ||
![]() |
11f3513b0c | ||
![]() |
9786c7c8ee |
@@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.1.8
|
||||
// @version 3.1.9
|
||||
// ==/UserScript==
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 3.1.8
|
||||
// @version 3.1.9
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@@ -14,7 +14,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '3.1.8';
|
||||
const SCRIPT_VERSION = '3.1.9';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
const ENABLE_XCLOUD_LOGGER = false;
|
||||
@@ -6635,7 +6635,7 @@ class Preferences {
|
||||
setting.note = '⚠️ ' + __('browser-unsupported-feature');
|
||||
} else {
|
||||
// Set default value to the best codec profile
|
||||
setting.default = keys[keys.length - 1];
|
||||
// setting.default = keys[keys.length - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -6877,7 +6877,7 @@ class Preferences {
|
||||
|
||||
|
||||
[Preferences.STATS_ITEMS]: {
|
||||
'default': [StreamStats.PING, StreamStats.FPS, StreamStats.PACKETS_LOST, StreamStats.FRAMES_LOST],
|
||||
'default': [StreamStats.PING, StreamStats.FPS, StreamStats.BITRATE, StreamStats.DECODE_TIME, StreamStats.PACKETS_LOST, StreamStats.FRAMES_LOST],
|
||||
'multiple_options': {
|
||||
[StreamStats.PING]: `${StreamStats.PING.toUpperCase()}: ${__('stat-ping')}`,
|
||||
[StreamStats.FPS]: `${StreamStats.FPS.toUpperCase()}: ${__('stat-fps')}`,
|
||||
@@ -6894,10 +6894,10 @@ class Preferences {
|
||||
'default': false,
|
||||
},
|
||||
[Preferences.STATS_QUICK_GLANCE]: {
|
||||
'default': false,
|
||||
'default': true,
|
||||
},
|
||||
[Preferences.STATS_POSITION]: {
|
||||
'default': 'top-left',
|
||||
'default': 'top-right',
|
||||
'options': {
|
||||
'top-left': __('top-left'),
|
||||
'top-center': __('top-center'),
|
||||
@@ -7283,12 +7283,12 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
||||
},
|
||||
|
||||
mkbIsMouseAndKeyboardTitle: function(funcStr) {
|
||||
const text = 'isMouseAndKeyboardTitle:()=>yn';
|
||||
const text = 'isMouseAndKeyboardTitle:()=>';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return funcStr.replace(text, `isMouseAndKeyboardTitle:()=>(function(e) { return e && e.details ? window.NATIVE_MKB_TITLES.includes(e.details.productId) : true; })`);
|
||||
return funcStr.replace(text, `isMouseAndKeyboardTitle:()=>(function(e) { return e && e.details ? window.NATIVE_MKB_TITLES.includes(e.details.productId) : true; }),uwuwu:()=>`);
|
||||
},
|
||||
|
||||
mkbMouseAndKeyboardEnabled: function(funcStr) {
|
||||
@@ -7329,6 +7329,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log('[Better xCloud] Remaining patches:', Patcher.#PATCH_ORDERS);
|
||||
Patcher.#PATCH_ORDERS = Patcher.#PATCH_ORDERS.concat(Patcher.#PLAYING_PATCH_ORDERS);
|
||||
Patcher.#cleanupPatches();
|
||||
|
||||
@@ -7382,13 +7383,13 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
||||
getPref(Preferences.UI_LAYOUT) === 'tv' && ['tvLayout'],
|
||||
|
||||
ENABLE_XCLOUD_LOGGER && [
|
||||
'enableXcloudLogger',
|
||||
'enableConsoleLogging',
|
||||
'enableXcloudLogger',
|
||||
],
|
||||
|
||||
getPref(Preferences.BLOCK_TRACKING) && [
|
||||
'disableTrackEvent',
|
||||
'blockWebRtcStatsCollector',
|
||||
'disableTrackEvent',
|
||||
],
|
||||
|
||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && [
|
||||
@@ -10413,7 +10414,7 @@ function setupQuickSettingsBar() {
|
||||
},
|
||||
{
|
||||
pref: Preferences.STATS_QUICK_GLANCE,
|
||||
label: __('enable-quick-glance-mode'),
|
||||
label: '👀 ' + __('enable-quick-glance-mode'),
|
||||
onChange: e => {
|
||||
e.target.checked ? StreamStats.quickGlanceSetup() : StreamStats.quickGlanceStop();
|
||||
},
|
||||
@@ -10818,6 +10819,7 @@ if (getPref(Preferences.AUDIO_ENABLE_VOLUME_CONTROL)) {
|
||||
window.AudioContext = function() {
|
||||
const ctx = new OrgAudioContext();
|
||||
STREAM_AUDIO_CONTEXT = ctx;
|
||||
STREAM_AUDIO_GAIN_NODE = null;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@@ -10865,6 +10867,13 @@ RTCPeerConnection.prototype.createDataChannel = function() {
|
||||
const OrgRTCPeerConnection = window.RTCPeerConnection;
|
||||
window.RTCPeerConnection = function() {
|
||||
STREAM_WEBRTC = new OrgRTCPeerConnection();
|
||||
|
||||
STREAM_WEBRTC.addEventListener('connectionstatechange', e => {
|
||||
if (STREAM_WEBRTC.connectionState === 'connecting') {
|
||||
STREAM_AUDIO_GAIN_NODE = null;
|
||||
}
|
||||
console.log('connectionState', STREAM_WEBRTC.connectionState);
|
||||
});
|
||||
return STREAM_WEBRTC;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user