Refactor browser & userAgent's capabilities

This commit is contained in:
redphx
2024-07-06 15:53:01 +07:00
parent b6746598a3
commit 2b63edb7eb
14 changed files with 48 additions and 25 deletions

View File

@@ -41,7 +41,7 @@ export class GameBar {
this.actions = [
new ScreenshotAction(),
...(STATES.userAgentHasTouchSupport && (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== 'off') ? [new TouchControlAction()] : []),
...(STATES.userAgent.capabilities.touch && (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== 'off') ? [new TouchControlAction()] : []),
new MicrophoneAction(),
];