decord/source/components_native/common/VolumeSlider.tsx

79 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 9915
// Function ID: 9916
2026-07-20 16:05:17 +00:00
// Name: VolumeSlider
// Dependencies: [19, 17, 4545, 21, 1234, 4481, 709, 4197, 9916, 8208, 4976, 1233, 5062, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 9915 (VolumeSlider)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
2026-09-01 10:26:29 +00:00
import map from "map" /* 4197 */;
import VoiceNormalIcon from "VoiceNormalIcon" /* 5062 */;
import _modDef8208 from "module_8208" /* 8208 */;
import VoiceXIcon from "VoiceXIcon" /* 9916 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import { MAX_EMBEDDED_VOLUME_PERCEPTUAL as closure_4 } from "DesktopSources" /* 4545 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-09-02 09:53:35 +00:00
import set from "set" /* 1234 */;
import createCacheKey from "createCacheKey" /* 4481 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
2026-07-20 16:05:17 +00:00
let num = 16;
2026-07-23 10:11:24 +00:00
if (set.isAndroid()) {
2026-07-20 16:05:17 +00:00
num = 0;
}
2026-07-29 08:29:29 +00:00
let closure_7 = createCacheKey.createStyles({ volumerSlider: { flexDirection: "row", alignItems: "center" }, leftIcon: { marginRight: num }, rightIcon: { marginLeft: num }, volumerSliderNative: { flex: 1, marginVertical: -10, backgroundColor: "transparent" } });
2026-07-23 10:11:24 +00:00
const result = set.fileFinishedImporting("components_native/common/VolumeSlider.tsx");
2026-07-20 16:05:17 +00:00
export default function VolumeSlider(maxTrackTintColor) {
let PRIMARY_400 = maxTrackTintColor.maxTrackTintColor;
if (PRIMARY_400 === undefined) {
2026-08-24 06:08:38 +00:00
PRIMARY_400 = ThemesDefault.unsafe_rawColors.PRIMARY_400;
2026-07-20 16:05:17 +00:00
}
({ maxVolume, value } = maxTrackTintColor);
if (maxVolume === undefined) {
maxVolume = closure_4;
}
2026-08-31 15:47:37 +00:00
({ onValueChange: require, onResponderGrant, accessibilityLabel } = maxTrackTintColor);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(maxTrackTintColor, Object.create(null));
const tmp4 = callback2();
2026-08-24 06:08:38 +00:00
let obj = map;
2026-07-29 08:29:29 +00:00
let minTrackColor = merged.minTrackColor;
if (minTrackColor == null) {
2026-08-24 06:08:38 +00:00
minTrackColor = obj.useToken(ThemesDefault.colors.BACKGROUND_BRAND);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: items, children: null };
items = [tmp4.volumerSlider, maxTrackTintColor.style];
obj = { style: tmp4.leftIcon };
2026-08-24 06:08:38 +00:00
const items1 = [callback(VoiceXIcon.VoiceXIcon, obj), , ];
obj1 = { style: tmp4.volumerSliderNative, value: null, minimumValue: 0, maximumValue: null, minimumTrackTintColor: null, maximumTrackTintColor: null, accessibilityLabel: null, onValueChange: null, onResponderGrant: null };
let tmp5Result = tmp5(4976);
2026-07-29 08:29:29 +00:00
obj1[1] = tmp5Result.amplitudeToPerceptual(value);
obj1[3] = maxVolume;
obj1[4] = minTrackColor;
obj1[5] = PRIMARY_400;
2026-08-31 15:47:37 +00:00
if (accessibilityLabel == null) {
2026-09-02 09:53:35 +00:00
const intl = tmp5(1233).intl;
accessibilityLabel = intl.string(tmp5(1233).t.xPHVBs);
2026-08-31 15:47:37 +00:00
}
obj1[6] = accessibilityLabel;
2026-07-29 08:29:29 +00:00
obj1[7] = function onValueChange(arg0) {
2026-08-24 06:08:38 +00:00
return callback(closure_1_0(closure_1_2[10]).perceptualToAmplitude(arg0));
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
if (onResponderGrant == null) {
2026-09-02 09:53:35 +00:00
tmp5Result = tmp5(1234);
2026-07-20 16:05:17 +00:00
let fn;
2026-07-29 08:29:29 +00:00
if (tmp5Result.isAndroid()) {
2026-07-20 16:05:17 +00:00
fn = () => true;
}
onResponderGrant = fn;
}
2026-07-29 08:29:29 +00:00
obj1[8] = onResponderGrant;
items1[1] = callback(_modDef8208, obj1);
2026-08-24 06:08:38 +00:00
items1[2] = callback(VoiceNormalIcon.VoiceNormalIcon, { style: tmp4.rightIcon });
2026-07-29 08:29:29 +00:00
obj[1] = items1;
return closure_6(View, obj);
2026-07-20 16:05:17 +00:00
};