mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 16:17:20 +02:00
Fix not setting default User-Agent correctly
This commit is contained in:
parent
b4a94c95c0
commit
362638ff0c
@ -1,4 +1,5 @@
|
|||||||
import { UserAgentProfile } from "@enums/user-agent";
|
import { UserAgentProfile } from "@enums/user-agent";
|
||||||
|
import { BX_FLAGS } from "./bx-flags";
|
||||||
|
|
||||||
type UserAgentConfig = {
|
type UserAgentConfig = {
|
||||||
profile: UserAgentProfile,
|
profile: UserAgentProfile,
|
||||||
@ -35,7 +36,7 @@ export class UserAgent {
|
|||||||
static init() {
|
static init() {
|
||||||
UserAgent.#config = JSON.parse(window.localStorage.getItem(UserAgent.STORAGE_KEY) || '{}') as UserAgentConfig;
|
UserAgent.#config = JSON.parse(window.localStorage.getItem(UserAgent.STORAGE_KEY) || '{}') as UserAgentConfig;
|
||||||
if (!UserAgent.#config.profile) {
|
if (!UserAgent.#config.profile) {
|
||||||
UserAgent.#config.profile = UserAgentProfile.DEFAULT;
|
UserAgent.#config.profile = (BX_FLAGS.DeviceInfo.deviceType === 'android-tv' || BX_FLAGS.DeviceInfo.deviceType === 'webos') ? UserAgentProfile.VR_OCULUS : UserAgentProfile.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UserAgent.#config.custom) {
|
if (!UserAgent.#config.custom) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user