decord/source/modules/go_live/GoLiveAutoQualityExperiment.tsx

61 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 10696
// Function ID: 10697
2026-07-20 16:05:17 +00:00
// Name: getGoLiveAutoQualityExperimentConfig
2026-08-05 07:35:12 +00:00
// Dependencies: [1212, 4344, 4310, 1349, 589, 595, 4434, 2]
2026-07-29 08:29:29 +00:00
// Exports: getGoLiveAutoQualityExperimentConfig, maybeMigrateToAutoQuality, useGoLiveAutoQualityExperimentConfig
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 10696 (getGoLiveAutoQualityExperimentConfig)
2026-07-29 08:29:29 +00:00
import initialize from "initialize";
import ApplicationStreamPresets from "ApplicationStreamPresets";
import { ApplicationStreamPresets } from "RESOLUTION_720";
2026-07-23 10:11:24 +00:00
import importDefaultResult from "getUnitId";
const require = arg1;
let obj = { allowAutoQuality: false, defaultAutoQuality: false, migrateAutoQuality: false };
2026-07-29 08:29:29 +00:00
const GoLiveAutoQualityMigrationVersion = "GoLiveAutoQualityMigrationVersion";
obj = { name: "2025-10-go-live-auto-quality", kind: "user", defaultConfig: obj, variations: null };
obj = { 1: null, 2: null };
2026-07-20 16:05:17 +00:00
const obj1 = {};
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj1.allowAutoQuality = true;
obj1.migrateAutoQuality = true;
2026-07-20 16:05:17 +00:00
obj[1] = obj1;
const obj2 = {};
const merged1 = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj2.allowAutoQuality = true;
obj2.defaultAutoQuality = true;
2026-07-20 16:05:17 +00:00
obj[2] = obj2;
2026-07-29 08:29:29 +00:00
obj[3] = obj;
let closure_6 = require("getUnitId")(obj);
let result = require("RESOLUTION_720").fileFinishedImporting("modules/go_live/GoLiveAutoQualityExperiment.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getGoLiveAutoQualityExperimentConfig = function getGoLiveAutoQualityExperimentConfig(location) {
return store.getConfig({ location: location.location });
};
2026-07-20 16:05:17 +00:00
export const useGoLiveAutoQualityExperimentConfig = function useGoLiveAutoQualityExperimentConfig(location) {
2026-07-23 10:11:24 +00:00
location = location.location;
2026-07-29 08:29:29 +00:00
const items = [initialize];
return location(589).useStateFromStores(items, () => outer1_6.getConfig({ location }));
2026-07-20 16:05:17 +00:00
};
export const maybeMigrateToAutoQuality = function maybeMigrateToAutoQuality() {
2026-07-29 08:29:29 +00:00
const Storage = require(595) /* Storage */.Storage;
let num = Storage.get(GoLiveAutoQualityMigrationVersion);
if (num == null) {
num = 0;
}
2026-07-20 16:05:17 +00:00
if (store.getConfig({ location: "maybeMigrateToAutoQuality" }).migrateAutoQuality) {
2026-07-29 08:29:29 +00:00
if (tmp4 < 1) {
2026-07-23 10:11:24 +00:00
state = state.getState();
2026-07-20 16:05:17 +00:00
if (state.preset !== ApplicationStreamPresets.PRESET_CUSTOM) {
2026-07-29 08:29:29 +00:00
const obj = { preset: null, resolution: null, frameRate: null, soundshareEnabled: null, noTrack: true };
obj[0] = tmp9.PRESET_AUTO;
({ resolution: obj2[1], fps: obj2[2], soundshareEnabled: obj2[3] } = state);
2026-08-05 07:35:12 +00:00
tmp(4434).updateStreamSettings(obj);
2026-07-29 08:29:29 +00:00
const Storage2 = tmp(595).Storage;
const result = Storage2.set(GoLiveAutoQualityMigrationVersion, 1);
2026-08-05 07:35:12 +00:00
const tmpResult = tmp(4434);
2026-07-20 16:05:17 +00:00
}
}
}
};