Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
61 lines
1.7 KiB
TypeScript
61 lines
1.7 KiB
TypeScript
// Module ID: 4754
|
|
// Function ID: 4755
|
|
// Name: MediaPostThumbnailUtils
|
|
// Dependencies: [4755, 2]
|
|
// Exports: getBackgroundImageUrl, getEmbedPreviewImageUrl, getThumbnailImage
|
|
|
|
// Module 4754 (MediaPostThumbnailUtils)
|
|
import MediaFormatTesters from "MediaFormatTesters" /* 4755 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const result = size.fileFinishedImporting("modules/media_channel/MediaPostThumbnailUtils.tsx");
|
|
|
|
export const MAX_THUMBNAIL_COUNT = 4;
|
|
export const getEmbedPreviewImageUrl = function getEmbedPreviewImageUrl(arg0) {
|
|
if (null != arg0) {
|
|
({ thumbnail, image } = arg0);
|
|
if (null != thumbnail) {
|
|
let url2 = thumbnail.proxy_url;
|
|
if (url2 == null) {
|
|
url2 = thumbnail.url;
|
|
}
|
|
let tmp = url2;
|
|
} else if (null != image) {
|
|
let url = image.proxy_url;
|
|
if (url == null) {
|
|
url = image.url;
|
|
}
|
|
tmp = url;
|
|
}
|
|
return tmp;
|
|
}
|
|
};
|
|
export const getBackgroundImageUrl = function getBackgroundImageUrl(coverImage) {
|
|
if (obj.isAnimatedImageUrl(coverImage)) {
|
|
const _HermesInternal = HermesInternal;
|
|
let combined = "" + coverImage + "?format=webp";
|
|
} else {
|
|
combined = coverImage;
|
|
const tmpResult = MediaFormatTesters;
|
|
}
|
|
return combined;
|
|
};
|
|
export const getThumbnailImage = function getThumbnailImage(thumbnail) {
|
|
if (null != thumbnail) {
|
|
({ url, proxy_url } = thumbnail);
|
|
let tmp = url;
|
|
if (null != url) {
|
|
tmp = url;
|
|
if (null != proxy_url) {
|
|
let combined = proxy_url;
|
|
if (obj.isVideoUrl(url)) {
|
|
const _HermesInternal = HermesInternal;
|
|
combined = "" + proxy_url + "?format=webp";
|
|
}
|
|
tmp = combined;
|
|
obj = MediaFormatTesters;
|
|
}
|
|
}
|
|
return tmp;
|
|
}
|
|
};
|