Files
discord-decomp/sources/modules/go_live/native/ApplicationStreamingManager.tsx
T
2026-07-28 01:06:53 +03:00

125 lines
7.8 KiB
TypeScript

/* Metro module 16189; source: modules/go_live/native/ApplicationStreamingManager.tsx; dependencies: [6, 7, 15, 17, 18, 31, 4399, 4282, 4291, 33, 3, 4496, 16190, 1962, 10801, 8899, 16192, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ApplicationStreamingSettingsStore from '../../../stores/ApplicationStreamingSettingsStore.tsx'; /* Metro dependency 4399 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StreamSettingsConstantsModule from '../StreamSettingsConstants.tsx'; /* Metro dependency 4282 */
import * as ConstantsModule from '../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun125080(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:6, offset: 0x025cd6f8, size: 379 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = Logger;
value = new value('ApplicationStreamingManager');
value.enableNativeLogger(true);
value = importDefault(16192) /* metro dependency 16192: ApplicationStreamingManager */;
value = _fun125084(value);
value = new value();
(FileImportTrackerModule).fileFinishedImporting('modules/go_live/native/ApplicationStreamingManager.tsx');
exports.default = value;
function _isNativeReflectConstruct_125081() { // fn#125081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:251, offset: 0x025cd873, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_125081_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun125084(a0) { // fn#125084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:526, offset: 0x025cd8d5, size: 128 bytes, params: 2, frame: 16
const ApplicationStreamingManager2 = ApplicationStreamingManager;
Inherits(ApplicationStreamingManager2, a0);
return CreateClass(ApplicationStreamingManager2, [{key: 'platformShowStreamFull', value: value_125086},
{key: 'platformHandleStreamStart', value: value_125090}, {key: 'platformHandleVoiceStateUpdate',
value: function() {
}}]);
function ApplicationStreamingManager() { // fn#125085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:538, offset: 0x00ef83e3, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ApplicationStreamingManager);
const value3 = env1_6(ApplicationStreamingManager);
return env1_5(this, _isNativeReflectConstruct_125081() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_125086() { // fn#125086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:903, offset: 0x025cd955, size: 54 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_125087});
function value_125086Importer() { // fn#125087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:942, owner: value_125086.importer, offset: 0x025cd98b, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun125089;
});
function _fun125088({default: env0_0}) { // fn#125088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:976, offset: 0x025cd9cb, size: 23 bytes, params: 2, frame: 2
return _fun125089;
function _fun125089(a0) { // fn#125089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:991, offset: 0x025cd9e2, size: 36 bytes, params: 2, frame: 13
return ((Component) => <Component {...a0} />)(env0_0);
}
}
}
}
function value_125090({sourceId}) { // fn#125090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16397:1051, offset: 0x025cda06, size: 285 bytes, params: 2, frame: 19
var r0;
var value;
var defaultImport;
if (sourceId != null) {
value = environment.__proto__;
defaultImport = importDefault(10801) /* metro dependency 10801: MobileGoLiveUpsellExperiment */;
r0 = defaultImport.getConfig({location: 'platformHandleStreamStart'}).showMobileGoLiveUpsell ? ApplicationStreamingSettingsStore.getState() : {'preset': null,
'resolution': 720, 'fps': 30, 'soundshareEnabled': true, preset: ApplicationStreamPresets.PRESET_CUSTOM};
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setGoLiveSource({desktopSettings: {sourceId: sourceId,
sound: r0.soundshareEnabled}, qualityOptions: {preset: r0.preset, resolution: r0.resolution,
frameRate: r0.fps},
context: MediaEngineContextTypes.STREAM});
} else {
value = environment.__proto__;
env1_12.warn('invalid start_stream: both application + display modes were specified (source-id: ' + sourceId + ')');
}
}
}
}
global.__d(_fun125080, 16189, [6, 7, 15, 17, 18, 31, 4399, 4282, 4291, 33, 3, 4496, 16190, 1962, 10801, 8899, 16192,
2]) /* metro module 16189, dependencies: [6, 7, 15, 17, 18, 31, 4399, 4282, 4291, 33, 3, 4496, 16190, 1962, 10801, 8899, 16192, 2] */;