decord/source/modules/application_assets_v2/ApplicationAssetV2Utils.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

36 lines
1.4 KiB
TypeScript

// Module ID: 9119
// Function ID: 9120
// Name: ApplicationAssetV2Utils
// Dependencies: [1272, 1430, 2]
// Exports: getApplicationAssetUrl
// Module 9119 (ApplicationAssetV2Utils)
import HTTPUtils from "HTTPUtils" /* 1272 */;
import ImageLoaderUtils from "ImageLoaderUtils" /* 1430 */;
import size from "module_2" /* 2 */;
let result = size.fileFinishedImporting("modules/application_assets_v2/ApplicationAssetV2Utils.tsx");
export const getApplicationAssetUrl = function getApplicationAssetUrl(arg0, asset_id, width) {
if (null != window.GLOBAL_ENV.CDN_HOST) {
const _URL2 = URL;
const _location = location;
const _window = window;
const _HermesInternal2 = HermesInternal;
let str5 = new URL("" + location.protocol + "//" + window.GLOBAL_ENV.CDN_HOST + "/app-assets/" + arg0 + "/" + asset_id.asset_id + ".webp");
} else {
const _URL = URL;
const _HermesInternal = HermesInternal;
str5 = new URL("" + HTTPUtils.getAPIBaseURL() + "/applications/" + arg0 + "/app-assets/" + asset_id.asset_id + ".webp");
}
if (null != width) {
const searchParams = str5.searchParams;
const result = searchParams.set("size", ImageLoaderUtils.getBestMediaProxySize(width).toString());
const str11 = ImageLoaderUtils.getBestMediaProxySize(width);
}
if (asset_id.metadata.is_animated) {
const searchParams2 = str5.searchParams;
const result1 = searchParams2.set("animated", "true");
}
return str5.toString();
};