decord/source/modules/games/getGameMediaRefURL.tsx

49 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 4375
// Function ID: 4376
2026-07-20 16:05:17 +00:00
// Name: getGameMediaRefURL
2026-08-12 06:57:52 +00:00
// Dependencies: [1903, 1435, 4376, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 4375 (getGameMediaRefURL)
2026-07-23 10:11:24 +00:00
const result = require("isImageProxyURL").fileFinishedImporting("modules/games/getGameMediaRefURL.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function getGameMediaRefURL(arg0, type, size) {
2026-07-20 16:05:17 +00:00
if (null == type) {
return null;
} else {
type = type.type;
if ("hash" === type) {
let tmp7 = null;
if (!obj3.isNullOrEmpty(type.value)) {
2026-07-29 08:29:29 +00:00
let obj = { id: null, hash: null };
obj[0] = arg0;
obj[1] = type.value;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(size);
2026-08-11 06:20:06 +00:00
let gameAssetURL = importDefault(1435).getGameAssetURL(obj);
2026-07-29 08:29:29 +00:00
if (gameAssetURL == null) {
gameAssetURL = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp7 = gameAssetURL;
2026-08-11 06:20:06 +00:00
const obj4 = importDefault(1435);
2026-07-20 16:05:17 +00:00
}
return tmp7;
} else if ("url" === type) {
2026-08-12 06:57:52 +00:00
obj = require(4376) /* isImageProxyURL */;
2026-07-20 16:05:17 +00:00
size = undefined;
2026-07-29 08:29:29 +00:00
if (size != null) {
2026-07-20 16:05:17 +00:00
size = size.size;
}
2026-07-29 08:29:29 +00:00
obj = { size: null, keepAspectRatio: null };
obj[0] = size;
2026-07-20 16:05:17 +00:00
let keepAspectRatio;
2026-07-29 08:29:29 +00:00
if (size != null) {
2026-07-20 16:05:17 +00:00
keepAspectRatio = size.keepAspectRatio;
}
2026-07-29 08:29:29 +00:00
obj[1] = keepAspectRatio;
2026-07-20 16:05:17 +00:00
return obj.getSizedImageProxyURL(type.value, obj);
} else {
return null;
}
}
};