mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Init UserAgent before STATES
This commit is contained in:
parent
011b75057a
commit
8bee5b2073
@ -28,7 +28,7 @@ import { STATES } from "@utils/global";
|
|||||||
import { injectStreamMenuButtons } from "@modules/stream/stream-ui";
|
import { injectStreamMenuButtons } from "@modules/stream/stream-ui";
|
||||||
import { BxLogger } from "@utils/bx-logger";
|
import { BxLogger } from "@utils/bx-logger";
|
||||||
import { GameBar } from "./modules/game-bar/game-bar";
|
import { GameBar } from "./modules/game-bar/game-bar";
|
||||||
import { UserAgent } from "./utils/user-agent";
|
|
||||||
|
|
||||||
// Handle login page
|
// Handle login page
|
||||||
if (window.location.pathname.includes('/auth/msa')) {
|
if (window.location.pathname.includes('/auth/msa')) {
|
||||||
@ -188,8 +188,6 @@ window.addEventListener(BxEvent.STREAM_STOPPED, e => {
|
|||||||
|
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
UserAgent.init();
|
|
||||||
|
|
||||||
// Monkey patches
|
// Monkey patches
|
||||||
patchRtcPeerConnection();
|
patchRtcPeerConnection();
|
||||||
patchRtcCodecs();
|
patchRtcCodecs();
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
|
import { UserAgent } from "./user-agent";
|
||||||
|
|
||||||
export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION;
|
export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION;
|
||||||
export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||||
|
|
||||||
export const AppInterface = window.AppInterface;
|
export const AppInterface = window.AppInterface;
|
||||||
|
|
||||||
|
UserAgent.init();
|
||||||
|
|
||||||
export const STATES: BxStates = {
|
export const STATES: BxStates = {
|
||||||
isPlaying: false,
|
isPlaying: false,
|
||||||
appContext: {},
|
appContext: {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user