decord/source/components_native/calls/stream/VideoEmptyState.tsx

136 lines
5.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12493
// Function ID: 12494
2026-07-20 16:05:17 +00:00
// Name: VideoEmptyState
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 1391, 676, 21, 4668, 712, 12494, 1297, 1236, 12123, 9707, 589, 4766, 9899, 4536, 4739, 4751, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 12493 (VideoEmptyState)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import useMountLayoutEffectDefault from "useMountLayoutEffect" /* 4766 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_4 from "ensureGuildLoaded" /* 1391 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c5, Fragment: closure_6, jsxs: error } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = { NONE: "NONE", STREAM_ENDED: "STREAM_ENDED", STREAM_FAILED: "STREAM_FAILED" };
2026-07-29 08:29:29 +00:00
obj = { container: null, placeholderImage: null, placeholderText: null, buttonWrapper: null, buttonPill: null };
2026-08-24 06:08:38 +00:00
obj = { alignItems: "center", justifyContent: "center", backgroundColor: ThemesDefault.unsafe_rawColors.PRIMARY_700, padding: 8 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[1] = { marginBottom: 8, width: "100%", resizeMode: "contain" };
2026-08-24 06:08:38 +00:00
createCacheKey = { color: ThemesDefault.unsafe_rawColors.WHITE, fontFamily: require("ME").Fonts.PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20, textAlign: "center" };
2026-07-29 08:29:29 +00:00
obj[2] = createCacheKey;
obj[3] = { marginTop: 16, alignSelf: "center" };
2026-08-24 06:08:38 +00:00
obj[4] = { borderRadius: ThemesDefault.radii.round };
2026-07-29 08:29:29 +00:00
let closure_9 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
let obj2 = { borderRadius: ThemesDefault.radii.round };
const result = require("set").fileFinishedImporting("components_native/calls/stream/VideoEmptyState.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function VideoEmptyState(style) {
({ type, avError, removeSplashImage, removeCloseButton, stream } = style);
const merged = Object.assign(style, Object.create(null));
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-07-29 08:29:29 +00:00
const tmp2 = callback2();
2026-07-20 16:05:17 +00:00
if (obj.STREAM_ENDED === type) {
2026-07-29 08:29:29 +00:00
let tmp16 = !removeSplashImage;
if (!removeSplashImage) {
obj = { style: null };
obj[0] = tmp2.placeholderImage;
2026-08-24 06:08:38 +00:00
tmp16 = callback(stream(12494).StreamEnded, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { children: null };
const items = [tmp16, ];
2026-08-24 06:08:38 +00:00
obj1 = { style: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp2.placeholderText;
const intl2 = stream(1236).intl;
obj1[1] = intl2.formatToMarkdownString(stream(1236).t["1Ww0Hi"], {});
items[1] = callback(stream(1297).LegacyText, obj1);
obj[0] = items;
let tmp5Result = closure_7(closure_6, obj);
const tmp14 = closure_7;
const tmp15 = closure_6;
} else if (tmp3.STREAM_FAILED === type) {
let tmp7 = !removeSplashImage;
if (!removeSplashImage) {
obj = { style: null };
obj[0] = tmp2.placeholderImage;
2026-08-24 06:08:38 +00:00
tmp7 = callback(stream(12123).StreamFailed, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let obj2 = { children: null };
const items1 = [tmp7, ];
let obj3 = { style: null, children: null };
obj3[0] = tmp2.placeholderText;
const intl = stream(1236).intl;
obj3[1] = intl.string(stream(1236).t.rSlOep);
items1[1] = callback(stream(1297).LegacyText, obj3);
obj2[0] = items1;
tmp5Result = closure_7(closure_6, obj2);
const tmp5 = closure_7;
const tmp6 = closure_6;
} else if (tmp3.NONE === type) {
tmp5Result = null;
2026-07-20 16:05:17 +00:00
}
if (null != avError) {
2026-08-24 06:08:38 +00:00
let obj7 = stream(9707);
2026-07-29 08:29:29 +00:00
let errorCode = obj7.getErrorInfo(avError).errorCode;
2026-07-20 16:05:17 +00:00
} else {
errorCode = null;
2026-07-29 08:29:29 +00:00
if (type === tmp3.STREAM_FAILED) {
2026-08-24 06:08:38 +00:00
let obj6 = stream(9707);
errorCode = obj6.getErrorInfo(stream(9707).AVError.STREAM_FAILED_TO_START).errorCode;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let obj8 = stream(589);
2026-08-24 06:08:38 +00:00
const items2 = [closure_4];
2026-07-20 16:05:17 +00:00
const items3 = [stream.channelId];
2026-08-24 06:08:38 +00:00
importDefault = obj8.useStateFromStores(items2, () => closure_1_4.getChannel(stream.channelId), items3);
useMountLayoutEffectDefault(() => {
2026-07-29 08:29:29 +00:00
let isGuildStageVoiceResult;
if (closure_1 != null) {
isGuildStageVoiceResult = closure_1.isGuildStageVoice();
2026-07-20 16:05:17 +00:00
}
if (isGuildStageVoiceResult) {
2026-08-24 06:08:38 +00:00
const obj2 = stream(closure_1_2[14]);
obj2.stopStream(stream(closure_1_2[15]).encodeStreamKey(stream));
const obj3 = stream(closure_1_2[15]);
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const obj4 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
const items4 = [tmp2.container, style.style];
obj4.style = items4;
const items5 = [tmp5Result, , ];
2026-07-20 16:05:17 +00:00
let tmp34 = null != errorCode;
if (tmp34) {
2026-07-29 08:29:29 +00:00
const obj5 = { variant: "text-sm/semibold", color: "text-muted", selectable: true, children: null };
const intl3 = tmp28(1236).intl;
obj6 = { errorCode: null };
obj6[0] = errorCode;
obj5[3] = intl3.formatToPlainString(tmp28(1236).t.ejOT95, obj6);
2026-08-24 06:08:38 +00:00
tmp34 = callback(tmp28(4739).Text, obj5);
2026-07-20 16:05:17 +00:00
}
items5[1] = tmp34;
2026-07-29 08:29:29 +00:00
let tmp36 = !removeCloseButton;
if (!removeCloseButton) {
obj7 = { style: null, children: null };
obj7[0] = tmp2.buttonWrapper;
obj8 = { pillStyle: null, variant: "secondary", text: null, onPress: null };
obj8[0] = tmp2.buttonPill;
const intl4 = tmp28(1236).intl;
obj8[2] = intl4.string(tmp28(1236).t["4EGMWL"]);
obj8[3] = function onPress() {
2026-08-24 06:08:38 +00:00
obj = stream(closure_1_2[14]);
obj.stopStream(stream(closure_1_2[15]).encodeStreamKey(stream));
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj7[1] = callback(tmp28(4751).BaseTextButton, obj8);
2026-07-29 08:29:29 +00:00
tmp36 = callback(tmp32, obj7);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items5[2] = tmp36;
obj4.children = items5;
return closure_7(View, obj4);
2026-07-20 16:05:17 +00:00
};
export const VideoEmptyTypes = obj;