Add microphone action for Game Bar

This commit is contained in:
redphx
2024-05-11 21:15:22 +07:00
parent 5c9202119b
commit 362c5386d1
7 changed files with 143 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import { BxIcon } from "@utils/bx-icon";
import type { BaseGameBarAction } from "./action-base";
import { STATES } from "@utils/global";
import { PrefKey, getPref } from "@utils/preferences";
import { MicrophoneAction } from "./action-microphone";
export class GameBar {
@@ -38,6 +39,7 @@ export class GameBar {
this.actions = [
new ScreenshotAction(),
...(STATES.hasTouchSupport && (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== 'off') ? [new TouchControlAction()] : []),
new MicrophoneAction(),
];
// Render actions