decord/alpha/source/modules/go_live/GoLiveAutoQualityExperiment.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

61 lines
2.7 KiB
TypeScript

// Module ID: 10299
// Function ID: 10300
// Name: GoLiveAutoQualityExperiment
// Dependencies: [1235, 4873, 4874, 1435, 504, 510, 4969, 2]
// Exports: getGoLiveAutoQualityExperimentConfig, maybeMigrateToAutoQuality, useGoLiveAutoQualityExperimentConfig
// Module 10299 (GoLiveAutoQualityExperiment)
import Storage3 from "Storage" /* 510 */;
import ApexExperimentStore from "ApexExperimentStore" /* 1235 */;
import ApplicationStreamingSettingsStore from "ApplicationStreamingSettingsStore" /* 4873 */;
import ApexExperiment from "apex/ApexExperiment" /* 1435 */;
require = fn;
const ApplicationStreamPresets = fn(4874).ApplicationStreamPresets;
let obj = { allowAutoQuality: false, defaultAutoQuality: false, migrateAutoQuality: false };
const GoLiveAutoQualityMigrationVersion = "GoLiveAutoQualityMigrationVersion";
const obj2 = { name: "2025-10-go-live-auto-quality", kind: "user", defaultConfig: obj, variations: null };
const obj3 = { 1: null, 2: null };
const obj4 = {};
const merged = Object.assign(obj);
obj4.allowAutoQuality = true;
obj4.migrateAutoQuality = true;
obj3[1] = obj4;
const obj5 = {};
const merged1 = Object.assign(obj);
obj5.allowAutoQuality = true;
obj5.defaultAutoQuality = true;
obj3[2] = obj5;
obj2.variations = obj3;
let closure_6 = ApexExperiment(obj2);
const size = fn(2);
let result = size.fileFinishedImporting("modules/go_live/GoLiveAutoQualityExperiment.tsx");
export const getGoLiveAutoQualityExperimentConfig = function getGoLiveAutoQualityExperimentConfig(location) {
return closure_6.getConfig({ location: location.location });
};
export const useGoLiveAutoQualityExperimentConfig = function useGoLiveAutoQualityExperimentConfig(location) {
location = location.location;
const items = [ApexExperimentStore];
return location(504).useStateFromStores(items, () => config.getConfig({ location }));
};
export const maybeMigrateToAutoQuality = function maybeMigrateToAutoQuality() {
const Storage = Storage3.Storage;
let num = Storage.get(GoLiveAutoQualityMigrationVersion);
if (num == null) {
num = 0;
}
if (closure_6.getConfig({ location: "maybeMigrateToAutoQuality" }).migrateAutoQuality) {
if (tmp4 < 1) {
const state = ApplicationStreamingSettingsStore.getState();
if (state.preset !== ApplicationStreamPresets.PRESET_CUSTOM) {
const obj = { preset: tmp9.PRESET_AUTO, resolution: null, frameRate: null, soundshareEnabled: null, noTrack: true };
({ resolution: obj2.resolution, fps: obj2.frameRate, soundshareEnabled: obj2.soundshareEnabled } = state);
tmp(4969).updateStreamSettings(obj);
const Storage2 = tmp(510).Storage;
const result = Storage2.set(GoLiveAutoQualityMigrationVersion, 1);
const tmpResult = tmp(4969);
}
}
}
};