Update better-xcloud.user.js

This commit is contained in:
redphx 2024-05-12 08:09:05 +07:00
parent cec2bdf807
commit f06346457a

View File

@ -455,12 +455,12 @@ var Texts = {
"应用" "应用"
], ],
audio: [ audio: [
,
,
"Audio", "Audio",
"Audio", ,
"Audio", ,
"Audio", ,
"Audio",
"Audio",
"音声", "音声",
"오디오", "오디오",
"Dźwięk", "Dźwięk",
@ -475,8 +475,8 @@ var Texts = {
"Automatisch", "Automatisch",
"Otomatis", "Otomatis",
"Auto", "Auto",
"Auto", ,
"Auto", ,
"Automatico", "Automatico",
"自動", "自動",
"자동", "자동",
@ -489,12 +489,12 @@ var Texts = {
"自动" "自动"
], ],
"badge-audio": [ "badge-audio": [
,
,
"Audio", "Audio",
"Audio", ,
"Audio", ,
"Audio", ,
"Audio",
"Audio",
"音声", "音声",
"오디오", "오디오",
"Dźwięk", "Dźwięk",
@ -574,12 +574,12 @@ var Texts = {
"游玩时间" "游玩时间"
], ],
"badge-server": [ "badge-server": [
"Server", ,
"Server", ,
"Server", "Server",
"Servidor", "Servidor",
"Serveur", "Serveur",
"Server", ,
"サーバー", "サーバー",
"서버", "서버",
"Serwer", "Serwer",
@ -591,12 +591,12 @@ var Texts = {
"服务器" "服务器"
], ],
"badge-video": [ "badge-video": [
,
,
"Video", "Video",
"Video", ,
"Video",
"Video",
"Vidéo", "Vidéo",
"Video", ,
"映像", "映像",
"비디오", "비디오",
"Obraz", "Obraz",
@ -774,7 +774,7 @@ var Texts = {
"Очистить", "Очистить",
"Temizle", "Temizle",
"Очистити", "Очистити",
"Xóa", "Xa",
"清空" "清空"
], ],
close: [ close: [
@ -932,12 +932,12 @@ var Texts = {
"对比度" "对比度"
], ],
controller: [ controller: [
"Controller", ,
"Kontroler", "Kontroler",
"Controller", "Controller",
"Joystick", "Joystick",
"Contrôle", "Contrôle",
"Controller", ,
"コントローラー", "コントローラー",
"컨트롤러", "컨트롤러",
"Kontroler", "Kontroler",
@ -1222,7 +1222,7 @@ var Texts = {
], ],
edit: [ edit: [
"Bearbeiten", "Bearbeiten",
"Edit", ,
"Edit", "Edit",
"Editar", "Editar",
, ,
@ -1255,21 +1255,21 @@ var Texts = {
"启用手柄快捷方式" "启用手柄快捷方式"
], ],
"enable-game-bar": [ "enable-game-bar": [
, "\"Game Bar\" aktivieren",
, ,
"Enable Game Bar feature", "Enable Game Bar feature",
, ,
, ,
, ,
"Game Barを有効化",
, ,
, ,
, ,
, ,
, ,
, "Увімкнути функцію Game Bar",
,
"Kích hoạt tính năng Game Bar", "Kích hoạt tính năng Game Bar",
, "启用Game Bar"
], ],
"enable-local-co-op-support": [ "enable-local-co-op-support": [
"Lokale Koop-Unterstützung aktivieren", "Lokale Koop-Unterstützung aktivieren",
@ -1411,13 +1411,13 @@ var Texts = {
"Experimentell", "Experimentell",
"Eksperimental", "Eksperimental",
"Experimental", "Experimental",
"Experimental", ,
, ,
"Sperimentale", "Sperimentale",
"実験的機能", "実験的機能",
, ,
"Eksperymentalne", "Eksperymentalne",
"Experimental", ,
"Экспериментально", "Экспериментально",
"Deneme aşamasında", "Deneme aşamasında",
"Експериментальне", "Експериментальне",
@ -1492,6 +1492,11 @@ var Texts = {
"Fortnite: bắt buộc phiên bản console", "Fortnite: bắt buộc phiên bản console",
"Fortnite: 强制使用主机版客户端" "Fortnite: 强制使用主机版客户端"
], ],
"game-bar": [
,
,
"Game Bar"
],
"getting-consoles-list": [ "getting-consoles-list": [
"Rufe Liste der Konsolen ab...", "Rufe Liste der Konsolen ab...",
"Mendapatkan daftar konsol...", "Mendapatkan daftar konsol...",
@ -1591,8 +1596,7 @@ var Texts = {
"Скрыть сенсорный контроллер", "Скрыть сенсорный контроллер",
, ,
"Приховати сенсорний контролер", "Приховати сенсорний контролер",
"Ẩn bộ điều khiển cảm ứng", "Ẩn bộ điều khiển cảm ứng"
,
], ],
"horizontal-sensitivity": [ "horizontal-sensitivity": [
"Horizontale Empfindlichkeit", "Horizontale Empfindlichkeit",
@ -1697,16 +1701,16 @@ var Texts = {
"大" "大"
], ],
layout: [ layout: [
"Layout", ,
"Tata letak", "Tata letak",
"Layout", "Layout",
"Diseño", "Diseño",
, ,
"Layout", ,
"レイアウト", "レイアウト",
"레이아웃", "레이아웃",
"Układ", "Układ",
"Layout", ,
"Расположение", "Расположение",
"Arayüz Görünümü", "Arayüz Görünümü",
"Розмітка", "Розмітка",
@ -1837,7 +1841,7 @@ var Texts = {
"Mikrofon", "Mikrofon",
"Microphone", "Microphone",
"Micrófono", "Micrófono",
"Microphone", ,
"Microfono", "Microfono",
"マイク", "マイク",
"마이크", "마이크",
@ -1902,7 +1906,7 @@ var Texts = {
], ],
"mouse-and-keyboard": [ "mouse-and-keyboard": [
"Maus & Tastatur", "Maus & Tastatur",
"Mouse & Keyboard", ,
"Mouse & Keyboard", "Mouse & Keyboard",
"Ratón y teclado", "Ratón y teclado",
, ,
@ -1935,7 +1939,7 @@ var Texts = {
"静音" "静音"
], ],
name: [ name: [
"Name", ,
"Nama", "Nama",
"Name", "Name",
"Nombre", "Nombre",
@ -1986,18 +1990,18 @@ var Texts = {
"未找到主机" "未找到主机"
], ],
normal: [ normal: [
,
,
"Normal", "Normal",
"Normal", ,
"Normal", ,
"Normal",
"Normal",
"Normale", "Normale",
"標準", "標準",
"보통", "보통",
"Normalny", "Normalny",
"Normal", ,
"Средний", "Средний",
"Normal", ,
"Нормальний", "Нормальний",
"Thường", "Thường",
"中" "中"
@ -2008,7 +2012,7 @@ var Texts = {
"Off", "Off",
"Apagado", "Apagado",
"Désactivé", "Désactivé",
"Off", ,
"オフ", "オフ",
"꺼짐", "꺼짐",
"Wyłączone", "Wyłączone",
@ -2105,11 +2109,11 @@ var Texts = {
"游戏中" "游戏中"
], ],
position: [ position: [
"Position", ,
"Posisi", "Posisi",
"Position", "Position",
"Posición", "Posición",
"Position", ,
"Posizione", "Posizione",
"位置", "位置",
"위치", "위치",
@ -2191,7 +2195,7 @@ var Texts = {
], ],
preset: [ preset: [
"Voreinstellung", "Voreinstellung",
"Preset", ,
"Preset", "Preset",
"Preajuste", "Preajuste",
, ,
@ -2279,7 +2283,7 @@ var Texts = {
"Rasio", "Rasio",
"Ratio", "Ratio",
"Relación de aspecto", "Relación de aspecto",
"Ratio", ,
"Rapporto", "Rapporto",
"比率", "比率",
"화면 비율", "화면 비율",
@ -2309,7 +2313,7 @@ var Texts = {
"减少UI动画" "减少UI动画"
], ],
region: [ region: [
"Region", ,
"Wilayah", "Wilayah",
"Region", "Region",
"Región", "Región",
@ -2317,7 +2321,7 @@ var Texts = {
"Regione", "Regione",
"地域", "地域",
"지역", "지역",
"Region", ,
"Região", "Região",
"Регион", "Регион",
"Bölge", "Bölge",
@ -2326,8 +2330,8 @@ var Texts = {
"地区" "地区"
], ],
"remote-play": [ "remote-play": [
"Remote Play", ,
"Remote Play", ,
"Remote Play", "Remote Play",
"Reproducción remota", "Reproducción remota",
, ,
@ -2483,7 +2487,7 @@ var Texts = {
"Saturasi", "Saturasi",
"Saturation", "Saturation",
"Saturación", "Saturación",
"Saturation", ,
"Saturazione", "Saturazione",
"彩度", "彩度",
"채도", "채도",
@ -2564,12 +2568,12 @@ var Texts = {
"虚拟摇杆为玩家1手柄#1为玩家2" "虚拟摇杆为玩家1手柄#1为玩家2"
], ],
server: [ server: [
"Server", ,
"Server", ,
"Server", "Server",
"Servidor", "Servidor",
"Serveur", "Serveur",
"Server", ,
"サーバー", "サーバー",
"서버", "서버",
"Serwer", "Serwer",
@ -2679,8 +2683,7 @@ var Texts = {
"Показать сенсорный контроллер", "Показать сенсорный контроллер",
, ,
"Показати сенсорний контролер", "Показати сенсорний контролер",
"Hiện bộ điều khiển cảm ứng", "Hiện bộ điều khiển cảm ứng"
,
], ],
"show-wait-time": [ "show-wait-time": [
"Geschätzte Wartezeit anzeigen", "Geschätzte Wartezeit anzeigen",
@ -2768,19 +2771,19 @@ var Texts = {
"小" "小"
], ],
"smart-tv": [ "smart-tv": [
"Smart TV", ,
"Smart TV",
"Smart TV",
"Smart TV",
, ,
"Smart TV", "Smart TV",
,
,
,
"スマートTV", "スマートTV",
"스마트 TV", "스마트 TV",
"Smart TV", ,
"Smart TV", ,
"Smart TV", ,
"Akıllı TV", "Akıllı TV",
"Smart TV", ,
"TV thông minh", "TV thông minh",
"智能电视" "智能电视"
], ],
@ -2802,7 +2805,7 @@ var Texts = {
"声音" "声音"
], ],
standby: [ standby: [
"Standby", ,
"Siaga", "Siaga",
"Standby", "Standby",
"Modo de espera", "Modo de espera",
@ -2819,20 +2822,20 @@ var Texts = {
"待机" "待机"
], ],
"stat-bitrate": [ "stat-bitrate": [
"Bitrate", ,
"Bitrate", ,
"Bitrate", "Bitrate",
"Tasa de bits", "Tasa de bits",
"Bitrate", ,
"Bitrate", ,
"ビットレート", "ビットレート",
"비트레이트", "비트레이트",
"Bitrate", ,
"Bitrate", ,
"Скорость соединения", "Скорость соединения",
"Bit hızı", "Bit hızı",
"Бітрейт", "Бітрейт",
"Bitrate", ,
"码率" "码率"
], ],
"stat-decode-time": [ "stat-decode-time": [
@ -2854,19 +2857,19 @@ var Texts = {
], ],
"stat-fps": [ "stat-fps": [
"Framerate", "Framerate",
,
"FPS", "FPS",
"FPS", ,
"FPS", ,
"FPS", ,
"FPS", ,
"FPS", ,
"FPS", ,
"FPS", ,
"FPS",
"Кадр/сек", "Кадр/сек",
"FPS", ,
"Кадрів на секунду", "Кадрів на секунду",
"FPS", ,
"帧率" "帧率"
], ],
"stat-frames-lost": [ "stat-frames-lost": [
@ -2904,20 +2907,20 @@ var Texts = {
"丢包" "丢包"
], ],
"stat-ping": [ "stat-ping": [
"Ping", ,
"Ping", ,
"Ping", "Ping",
"Latencia", "Latencia",
"Ping", ,
"Ping", ,
"Ping", ,
"지연 시간", "지연 시간",
"Ping", ,
"Ping", ,
"Задержка соединения", "Задержка соединения",
"Gecikme", "Gecikme",
"Затримка", "Затримка",
"Ping", ,
"延迟" "延迟"
], ],
stats: [ stats: [
@ -2925,7 +2928,7 @@ var Texts = {
"Statistik", "Statistik",
"Stats", "Stats",
"Estadísticas", "Estadísticas",
"Stats", ,
"Statistiche", "Statistiche",
"統計情報", "統計情報",
"통계", "통계",
@ -2972,20 +2975,20 @@ var Texts = {
"摇杆回中强度" "摇杆回中强度"
], ],
stream: [ stream: [
,
,
"Stream", "Stream",
"Stream", ,
"Stream", ,
"Stream", ,
"Stream",
"Stream",
"ストリーミング", "ストリーミング",
"스트리밍", "스트리밍",
"Stream", ,
"Transmissão", "Transmissão",
"Видеопоток", "Видеопоток",
"Yayın", "Yayın",
"Трансляція", "Трансляція",
"Stream", ,
"串流" "串流"
], ],
stretch: [ stretch: [
@ -3053,8 +3056,7 @@ var Texts = {
"Сделать снимок экрана", "Сделать снимок экрана",
, ,
"Зробити знімок екрану", "Зробити знімок екрану",
"Lưu ảnh màn hình", "Lưu ảnh màn hình"
,
], ],
"target-resolution": [ "target-resolution": [
"Festgelegte Auflösung", "Festgelegte Auflösung",
@ -3308,8 +3310,7 @@ var Texts = {
(e) => `Сенсорная раскладка по ${e.name}`, (e) => `Сенсорная раскладка по ${e.name}`,
(e) => `${e.name} kişisinin dokunmatik kontrolcü tuş şeması`, (e) => `${e.name} kişisinin dokunmatik kontrolcü tuş şeması`,
(e) => `Розташування сенсорного керування від ${e.name}`, (e) => `Розташування сенсорного керування від ${e.name}`,
(e) => `Bố cục điều khiển cảm ứng tạo bởi ${e.name}`, (e) => `Bố cục điều khiển cảm ứng tạo bởi ${e.name}`
,
], ],
"touch-controller": [ "touch-controller": [
"Touch-Controller", "Touch-Controller",
@ -3352,15 +3353,14 @@ var Texts = {
"Interfaz de usuario", "Interfaz de usuario",
"Interface utilisateur", "Interface utilisateur",
"Interfaccia", "Interfaccia",
"UI", ,
"UI", ,
"Interfejs", "Interfejs",
"Interface", "Interface",
"Интерфейс", "Интерфейс",
"Kullanıcı arayüzü", "Kullanıcı arayüzü",
"Інтерфейс користувача", "Інтерфейс користувача",
"Giao diện", "Giao diện"
"UI"
], ],
unknown: [ unknown: [
"Unbekannt", "Unbekannt",
@ -3431,21 +3431,20 @@ var Texts = {
"使用鼠标的绝对位置" "使用鼠标的绝对位置"
], ],
"user-agent-note": [ "user-agent-note": [
"Könnte unerwartetes Verhalten verursachen",
,
"May cause unexpected behavior",
"Puede causar un comportamiento inesperado",
, ,
, ,
"This feature may cause unexpected behavior", "予期せぬ動作を引き起こす可能性があります",
, ,
, ,
, ,
, ,
, ,
, "Може викликати неочікувану поведінку",
, "Có thể gây ra các hành vi không mong muốn"
,
,
,
"Tính năng này có thể gây ra các hành vi không mong muốn",
,
], ],
"user-agent-profile": [ "user-agent-profile": [
"User-Agent Profil", "User-Agent Profil",
@ -3499,7 +3498,7 @@ var Texts = {
"振动强度" "振动强度"
], ],
"vibration-status": [ "vibration-status": [
"Vibration", ,
"Getaran", "Getaran",
"Vibration", "Vibration",
"Vibración", "Vibración",
@ -3516,12 +3515,12 @@ var Texts = {
"手柄震动" "手柄震动"
], ],
video: [ video: [
,
,
"Video", "Video",
"Video", ,
"Video",
"Video",
"Vidéo", "Vidéo",
"Video", ,
"映像", "映像",
"비디오", "비디오",
"Obraz", "Obraz",
@ -3585,32 +3584,32 @@ var Texts = {
], ],
"visual-quality-normal": [ "visual-quality-normal": [
"Mittel", "Mittel",
,
"Normal", "Normal",
"Normal", ,
"Normal", ,
"Normal",
"Normale", "Normale",
"中", "中",
"보통", "보통",
"Normalna", "Normalna",
"Normal", ,
"Среднее", "Среднее",
"Normal", ,
"Нормальний", "Нормальний",
"Thường", "Thường",
"中" "中"
], ],
volume: [ volume: [
"Lautstärke", "Lautstärke",
"Volume", ,
"Volume", "Volume",
"Volumen", "Volumen",
"Volume", ,
"Volume", ,
"音量", "音量",
"음량", "음량",
"Głośność", "Głośność",
"Volume", ,
"Громкость", "Громкость",
"Ses düzeyi", "Ses düzeyi",
"Гучність", "Гучність",
@ -3618,12 +3617,12 @@ var Texts = {
"音量" "音量"
], ],
"wait-time-countdown": [ "wait-time-countdown": [
"Countdown", ,
"Hitung mundur", "Hitung mundur",
"Countdown", "Countdown",
"Cuenta Regresiva", "Cuenta Regresiva",
"Compte à rebours", "Compte à rebours",
"Countdown", ,
"カウントダウン", "カウントダウン",
"카운트다운", "카운트다운",
"Pozostały czas oczekiwania", "Pozostały czas oczekiwania",
@ -4498,7 +4497,7 @@ var PrefKey;
PrefKey2["STREAM_TOUCH_CONTROLLER_STYLE_STANDARD"] = "stream_touch_controller_style_standard"; PrefKey2["STREAM_TOUCH_CONTROLLER_STYLE_STANDARD"] = "stream_touch_controller_style_standard";
PrefKey2["STREAM_TOUCH_CONTROLLER_STYLE_CUSTOM"] = "stream_touch_controller_style_custom"; PrefKey2["STREAM_TOUCH_CONTROLLER_STYLE_CUSTOM"] = "stream_touch_controller_style_custom";
PrefKey2["STREAM_DISABLE_FEEDBACK_DIALOG"] = "stream_disable_feedback_dialog"; PrefKey2["STREAM_DISABLE_FEEDBACK_DIALOG"] = "stream_disable_feedback_dialog";
PrefKey2["GAME_BAR_ENABLED"] = "game_bar_enabled"; PrefKey2["GAME_BAR_POSITION"] = "game_bar_position";
PrefKey2["LOCAL_CO_OP_ENABLED"] = "local_co_op_enabled"; PrefKey2["LOCAL_CO_OP_ENABLED"] = "local_co_op_enabled";
PrefKey2["CONTROLLER_ENABLE_SHORTCUTS"] = "controller_enable_shortcuts"; PrefKey2["CONTROLLER_ENABLE_SHORTCUTS"] = "controller_enable_shortcuts";
PrefKey2["CONTROLLER_ENABLE_VIBRATION"] = "controller_enable_vibration"; PrefKey2["CONTROLLER_ENABLE_VIBRATION"] = "controller_enable_vibration";
@ -4750,9 +4749,14 @@ class Preferences {
label: t("disable-post-stream-feedback-dialog"), label: t("disable-post-stream-feedback-dialog"),
default: false default: false
}, },
[PrefKey.GAME_BAR_ENABLED]: { [PrefKey.GAME_BAR_POSITION]: {
label: t("enable-game-bar"), label: t("position"),
default: true default: "bottom-left",
options: {
"bottom-left": t("bottom-left"),
"bottom-right": t("bottom-right"),
off: t("off")
}
}, },
[PrefKey.LOCAL_CO_OP_ENABLED]: { [PrefKey.LOCAL_CO_OP_ENABLED]: {
label: t("enable-local-co-op-support"), label: t("enable-local-co-op-support"),
@ -8165,7 +8169,8 @@ class GameBar {
actions = []; actions = [];
constructor() { constructor() {
let $container; let $container;
const $gameBar = CE("div", { id: "bx-game-bar", class: "bx-gone" }, $container = CE("div", { class: "bx-game-bar-container bx-offscreen" }), createSvgIcon(BxIcon.CARET_RIGHT)); const position = getPref(PrefKey.GAME_BAR_POSITION);
const $gameBar = CE("div", { id: "bx-game-bar", class: "bx-gone", "data-position": position }, $container = CE("div", { class: "bx-game-bar-container bx-offscreen" }), createSvgIcon(BxIcon.CARET_RIGHT));
this.actions = [ this.actions = [
new ScreenshotAction, new ScreenshotAction,
...STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== "off" ? [new TouchControlAction] : [], ...STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== "off" ? [new TouchControlAction] : [],
@ -8246,7 +8251,7 @@ var InputType;
})(InputType || (InputType = {})); })(InputType || (InputType = {}));
var BxExposed = { var BxExposed = {
onPollingModeChanged: (mode) => { onPollingModeChanged: (mode) => {
if (!getPref(PrefKey.GAME_BAR_ENABLED)) { if (getPref(PrefKey.GAME_BAR_POSITION) === "off") {
return; return;
} }
const gameBar = GameBar.getInstance(); const gameBar = GameBar.getInstance();
@ -8259,9 +8264,10 @@ var BxExposed = {
getTitleInfo: () => STATES.currentStream.titleInfo, getTitleInfo: () => STATES.currentStream.titleInfo,
modifyTitleInfo: (titleInfo) => { modifyTitleInfo: (titleInfo) => {
titleInfo = structuredClone(titleInfo); titleInfo = structuredClone(titleInfo);
let supportedInputTypes = titleInfo.details.supportedInputTypes;
titleInfo.details.hasMkbSupport = supportedInputTypes.includes(InputType.MKB);
if (STATES.hasTouchSupport) { if (STATES.hasTouchSupport) {
let touchControllerAvailability = getPref(PrefKey.STREAM_TOUCH_CONTROLLER); let touchControllerAvailability = getPref(PrefKey.STREAM_TOUCH_CONTROLLER);
let supportedInputTypes = titleInfo.details.supportedInputTypes;
if (touchControllerAvailability !== "off" && getPref(PrefKey.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) { if (touchControllerAvailability !== "off" && getPref(PrefKey.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) {
const gamepads = window.navigator.getGamepads(); const gamepads = window.navigator.getGamepads();
let gamepadFound = false; let gamepadFound = false;
@ -8279,7 +8285,6 @@ var BxExposed = {
if (touchControllerAvailability === "off") { if (touchControllerAvailability === "off") {
supportedInputTypes = supportedInputTypes.filter((i) => i !== InputType.CUSTOM_TOUCH_OVERLAY && i !== InputType.GENERIC_TOUCH); supportedInputTypes = supportedInputTypes.filter((i) => i !== InputType.CUSTOM_TOUCH_OVERLAY && i !== InputType.GENERIC_TOUCH);
} }
titleInfo.details.hasMkbSupport = supportedInputTypes.includes(InputType.MKB);
titleInfo.details.hasTouchSupport = supportedInputTypes.includes(InputType.NATIVE_TOUCH) || supportedInputTypes.includes(InputType.CUSTOM_TOUCH_OVERLAY) || supportedInputTypes.includes(InputType.GENERIC_TOUCH); titleInfo.details.hasTouchSupport = supportedInputTypes.includes(InputType.NATIVE_TOUCH) || supportedInputTypes.includes(InputType.CUSTOM_TOUCH_OVERLAY) || supportedInputTypes.includes(InputType.GENERIC_TOUCH);
if (!titleInfo.details.hasTouchSupport && touchControllerAvailability === "all") { if (!titleInfo.details.hasTouchSupport && touchControllerAvailability === "all") {
titleInfo.details.hasFakeTouchSupport = true; titleInfo.details.hasFakeTouchSupport = true;
@ -9054,7 +9059,6 @@ div[data-testid=media-container].bx-taking-screenshot:before {
#bx-game-bar { #bx-game-bar {
z-index: var(--bx-game-bar-z-index); z-index: var(--bx-game-bar-z-index);
position: fixed; position: fixed;
left: 0;
bottom: 0; bottom: 0;
width: 40px; width: 40px;
height: 90px; height: 90px;
@ -9079,7 +9083,6 @@ div[data-testid=media-container].bx-taking-screenshot:before {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
background: rgba(26,27,30,0.91); background: rgba(26,27,30,0.91);
border-radius: 0 10px 10px 0;
box-shadow: 0px 0px 6px #1c1c1c; box-shadow: 0px 0px 6px #1c1c1c;
transition: opacity 0.1s ease-in; transition: opacity 0.1s ease-in;
/* Touch controller buttons */ /* Touch controller buttons */
@ -9127,6 +9130,20 @@ div[data-testid=media-container].bx-taking-screenshot:before {
#bx-game-bar .bx-game-bar-container div[data-enabled='false'] button:last-of-type { #bx-game-bar .bx-game-bar-container div[data-enabled='false'] button:last-of-type {
display: block; display: block;
} }
#bx-game-bar[data-position="bottom-left"] {
left: 0;
direction: ltr;
}
#bx-game-bar[data-position="bottom-left"] .bx-game-bar-container {
border-radius: 0 10px 10px 0;
}
#bx-game-bar[data-position="bottom-right"] {
right: 0;
direction: rtl;
}
#bx-game-bar[data-position="bottom-right"] .bx-game-bar-container {
border-radius: 10px 0 0 10px;
}
.bx-badges { .bx-badges {
position: absolute; position: absolute;
margin-left: 0px; margin-left: 0px;
@ -10504,7 +10521,6 @@ var SETTINGS_UI = {
items: [ items: [
PrefKey.STREAM_TARGET_RESOLUTION, PrefKey.STREAM_TARGET_RESOLUTION,
PrefKey.STREAM_CODEC_PROFILE, PrefKey.STREAM_CODEC_PROFILE,
PrefKey.GAME_BAR_ENABLED,
PrefKey.AUDIO_MIC_ON_PLAYING, PrefKey.AUDIO_MIC_ON_PLAYING,
PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG, PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG,
PrefKey.SCREENSHOT_APPLY_FILTERS, PrefKey.SCREENSHOT_APPLY_FILTERS,
@ -10513,6 +10529,11 @@ var SETTINGS_UI = {
PrefKey.STREAM_COMBINE_SOURCES PrefKey.STREAM_COMBINE_SOURCES
] ]
}, },
[t("game-bar")]: {
items: [
PrefKey.GAME_BAR_POSITION
]
},
[t("local-co-op")]: { [t("local-co-op")]: {
items: [ items: [
PrefKey.LOCAL_CO_OP_ENABLED PrefKey.LOCAL_CO_OP_ENABLED
@ -10846,7 +10867,7 @@ var main = function() {
BX_FLAGS.CheckForUpdate && checkForUpdate(); BX_FLAGS.CheckForUpdate && checkForUpdate();
addCss(); addCss();
Toast.setup(); Toast.setup();
getPref(PrefKey.GAME_BAR_ENABLED) && GameBar.getInstance(); getPref(PrefKey.GAME_BAR_POSITION) !== "off" && GameBar.getInstance();
BX_FLAGS.PreloadUi && setupStreamUi(); BX_FLAGS.PreloadUi && setupStreamUi();
StreamBadges.setupEvents(); StreamBadges.setupEvents();
StreamStats.setupEvents(); StreamStats.setupEvents();
@ -10942,7 +10963,7 @@ window.addEventListener(BxEvent.STREAM_PLAYING, (e) => {
STATES.currentStream.$video = $video; STATES.currentStream.$video = $video;
STATES.isPlaying = true; STATES.isPlaying = true;
injectStreamMenuButtons(); injectStreamMenuButtons();
if (getPref(PrefKey.GAME_BAR_ENABLED)) { if (getPref(PrefKey.GAME_BAR_POSITION) !== "off") {
const gameBar = GameBar.getInstance(); const gameBar = GameBar.getInstance();
gameBar.reset(); gameBar.reset();
gameBar.enable(); gameBar.enable();