mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 05:38:27 +02:00
Migrate more events to EventBus
This commit is contained in:
@@ -2,6 +2,8 @@ import type { PrefKey, StorageKey } from "@/enums/pref-keys";
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
import { BxLogger } from "./bx-logger";
|
||||
import { AppInterface } from "./global";
|
||||
import type { MicrophoneState } from "@/modules/shortcuts/microphone-shortcut";
|
||||
import type { SpeakerState } from "@/modules/shortcuts/sound-shortcut";
|
||||
|
||||
type EventCallback<T = any> = (payload: T) => void;
|
||||
|
||||
@@ -38,6 +40,12 @@ type StreamEvents = {
|
||||
'state.stopped': {};
|
||||
'state.error': {};
|
||||
|
||||
'gameBar.activated': {},
|
||||
'speaker.state.changed': { state: SpeakerState },
|
||||
'video.visibility.changed': { isVisible: boolean },
|
||||
// Inside patch
|
||||
'microphone.state.changed': { state: MicrophoneState },
|
||||
|
||||
dataChannelCreated: { dataChannel: RTCDataChannel };
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user