decord/source/5829_parsePossibleSources.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 5829
// Function ID: 5830
2026-07-29 08:29:29 +00:00
// Name: parsePossibleSources
// Dependencies: [17]
// Exports: parsePossibleSources
2026-08-25 06:04:03 +00:00
// Module 5829 (parsePossibleSources)
2026-08-24 06:08:38 +00:00
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-07-29 08:29:29 +00:00
2026-08-24 06:08:38 +00:00
const Image = get_ActivityIndicator.Image;
2026-07-29 08:29:29 +00:00
export const parsePossibleSources = function parsePossibleSources(source) {
const uri = source.uri;
2026-08-04 21:03:28 +00:00
if (typeof source === "string") {
2026-07-29 08:29:29 +00:00
let obj = { sourceName: null };
obj[0] = source;
} else {
2026-08-04 21:03:28 +00:00
if (typeof source === "object") {
2026-07-29 08:29:29 +00:00
if (!uri) {
obj = { sourceJson: null };
const _JSON = JSON;
obj[0] = JSON.stringify(source);
}
}
2026-08-04 21:03:28 +00:00
if (typeof source !== "object") {
2026-07-29 08:29:29 +00:00
let tmp2;
2026-08-04 21:03:28 +00:00
if (typeof source === "number") {
2026-07-29 08:29:29 +00:00
obj = { sourceDotLottieURI: null };
obj[0] = Image.resolveAssetSource(source).uri;
tmp2 = obj;
}
}
if (uri.includes(".lottie")) {
2026-08-24 06:08:38 +00:00
obj1 = { sourceDotLottieURI: null };
2026-07-29 08:29:29 +00:00
obj1[0] = uri;
let obj2 = obj1;
} else {
obj2 = { sourceURL: null };
obj2[0] = uri;
}
}
return obj;
};