mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Add "IsSupportedTvBrowser" flag
This commit is contained in:
parent
2b63edb7eb
commit
481b365e6e
@ -11,6 +11,8 @@ type BxFlags = Partial<{
|
||||
FeatureGates: {[key: string]: boolean} | null,
|
||||
|
||||
ScriptUi: 'default' | 'tv',
|
||||
|
||||
IsSupportedTvBrowser: boolean,
|
||||
}>
|
||||
|
||||
// Setup flags
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { UserAgentProfile } from "@enums/user-agent";
|
||||
import { deepClone } from "./global";
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
|
||||
type UserAgentConfig = {
|
||||
profile: UserAgentProfile,
|
||||
@ -116,7 +117,12 @@ export class UserAgent {
|
||||
return;
|
||||
}
|
||||
|
||||
const newUserAgent = UserAgent.get(profile);
|
||||
let newUserAgent = UserAgent.get(profile);
|
||||
|
||||
// Pretend to be Tizen TV
|
||||
if (BX_FLAGS.IsSupportedTvBrowser) {
|
||||
newUserAgent += 'SmartTV FC4A1DA2-711C-4E9C-BC7F-047AF8A672EA';
|
||||
}
|
||||
|
||||
// Clear data of navigator.userAgentData, force xCloud to detect browser based on navigator.userAgent
|
||||
(window.navigator as any).orgUserAgentData = (window.navigator as any).userAgentData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user