78 lines
4.9 KiB
TypeScript
78 lines
4.9 KiB
TypeScript
/* Metro module 10799; source: modules/go_live/GoLiveAutoQualityExperiment.tsx; dependencies: [1220, 4399, 4282, 1358, 566, 587, 8913, 2] */
|
|
import ApexExperimentStore from '../experiments/apex/ApexExperimentStore.tsx'; /* Metro dependency 1220 */
|
|
import ApexExperiment from '../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
|
|
import ApplicationStreamingSettingsStore from '../../stores/ApplicationStreamingSettingsStore.tsx'; /* Metro dependency 4399 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as StorageModule from '../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
|
|
import * as StreamSettingsConstantsModule from './StreamSettingsConstants.tsx'; /* Metro dependency 4282 */
|
|
|
|
function _fun82952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10985:6, offset: 0x01f07cd7, size: 313 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const getGoLiveAutoQualityExperimentConfig2 = getGoLiveAutoQualityExperimentConfig;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {'allowAutoQuality': false, 'defaultAutoQuality': false, 'migrateAutoQuality': false};
|
|
const object2 = {'name': '2025-10-go-live-auto-quality', 'kind': 'user'};
|
|
object2.defaultConfig = object;
|
|
const object3 = {};
|
|
const object4 = {};
|
|
copyDataProperties(object4, object, undefined);
|
|
object4['allowAutoQuality'] = true;
|
|
object4['migrateAutoQuality'] = true;
|
|
object3[1] = object4;
|
|
const object5 = {};
|
|
copyDataProperties(object5, object, undefined);
|
|
object5['allowAutoQuality'] = true;
|
|
object5['defaultAutoQuality'] = true;
|
|
object3[2] = object5;
|
|
object2.variations = object3;
|
|
const env0_5 = ApexExperiment(object2);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/go_live/GoLiveAutoQualityExperiment.tsx');
|
|
exports.getGoLiveAutoQualityExperimentConfig = getGoLiveAutoQualityExperimentConfig2;
|
|
exports.useGoLiveAutoQualityExperimentConfig = function({location}) {
|
|
return require(dependencyMap[4]).useStateFromStores([ApexExperimentStore], _fun82955);
|
|
};
|
|
exports.maybeMigrateToAutoQuality = maybeMigrateToAutoQuality;
|
|
function getGoLiveAutoQualityExperimentConfig({location}) { // fn#82953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10985:449, offset: 0x01f07e10, size: 34 bytes, params: 2, frame: 12
|
|
return env0_5.getConfig({location: location});
|
|
}
|
|
|
|
function useGoLiveAutoQualityExperimentConfig({location}) { // fn#82954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10985:738, offset: 0x01f07e32, size: 71 bytes, params: 2, frame: 14
|
|
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ApexExperimentStore], function() {
|
|
return getGoLiveAutoQualityExperimentConfig({location: location});
|
|
});
|
|
function _fun82955() { // fn#82955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10985:837, offset: 0x01f07e79, size: 29 bytes, params: 1, frame: 11
|
|
return getGoLiveAutoQualityExperimentConfig({location: location});
|
|
}
|
|
|
|
}
|
|
|
|
function maybeMigrateToAutoQuality() { // fn#82956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10985:923, offset: 0x01f07e96, size: 273 bytes, params: 1, frame: 20
|
|
var state;
|
|
const binding = env0_5;
|
|
const getConfig = binding.getConfig;
|
|
const migrateAutoQuality = Reflect.apply(getConfig, binding,
|
|
[{location: 'maybeMigrateToAutoQuality'}]).migrateAutoQuality;
|
|
const Number = global.Number;
|
|
const Storage = (StorageModule).Storage;
|
|
if (migrateAutoQuality) {
|
|
if (!(Number(Storage.get('GoLiveAutoQualityMigrationVersion') ?? 0) >= 1)) {
|
|
state = ApplicationStreamingSettingsStore.getState();
|
|
if (state.preset !== ApplicationStreamPresets.PRESET_CUSTOM) {
|
|
(require(8913) /* metro dependency 8913: StreamActionCreators */).updateStreamSettings({preset: ApplicationStreamPresets.PRESET_AUTO,
|
|
|
|
|
|
|
|
resolution: state.resolution, frameRate: state.fps, soundshareEnabled: state.soundshareEnabled,
|
|
noTrack: true});
|
|
Storage.set('GoLiveAutoQualityMigrationVersion', 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun82952, 10799, [1220, 4399, 4282, 1358, 566, 587, 8913,
|
|
2]) /* metro module 10799, dependencies: [1220, 4399, 4282, 1358, 566, 587, 8913, 2] */;
|