Files
discord-decomp/modules/go_live/native/ApplicationStreamingManager.tsx
T
2026-11-01 12:12:55 +02:00

48 lines
2.0 KiB
TypeScript

// Metro module 16693 (f16694).
import ApplicationStreamingSettingsStore from "../../../stores/ApplicationStreamingSettingsStore";
import { ApplicationStreamPresets } from "../StreamSettingsConstants";
import { MediaEngineContextTypes } from "../../../_bundle/Module4250";
import Logger from "../../debug/Logger";
import ApplicationStreamingManager2 from "../ApplicationStreamingManager";
import AlertActionCreators from "../../../actions/native/AlertActionCreators";
import MobileGoLiveUpsellExperiment from "./MobileGoLiveUpsellExperiment";
import AudioActionCreators from "../../../actions/AudioActionCreators";
let c12027_7 = new Logger("ApplicationStreamingManager");
c12027_7.enableNativeLogger(true);
class ApplicationStreamingManager extends ApplicationStreamingManager2 {
platformShowStreamFull() {
AlertActionCreators.openLazy({
importer: () => import("../../../components_native/calls/stream/StreamFullAlert").then(({ default: Component }) => (a0) => <Component {...a0} />)
});
}
platformHandleStreamStart({ sourceId }) {
if (sourceId != null) {
const r27 = MobileGoLiveUpsellExperiment.getConfig({
location: "platformHandleStreamStart"
}).showMobileGoLiveUpsell ? ApplicationStreamingSettingsStore.getState() : {
preset: ApplicationStreamPresets.PRESET_CUSTOM,
resolution: 720,
fps: 30,
soundshareEnabled: true
};
AudioActionCreators.setGoLiveSource({
desktopSettings: {
sourceId,
sound: r27.soundshareEnabled
},
qualityOptions: {
preset: r27.preset,
resolution: r27.resolution,
frameRate: r27.fps
},
context: MediaEngineContextTypes.STREAM
});
} else {
c12027_7.warn(`invalid start_stream: both application + display modes were specified (source-id: ${sourceId})`);
}
}
platformHandleVoiceStateUpdate() {}
}
const applicationStreamingManager = new ApplicationStreamingManager();
export default applicationStreamingManager;