decord/source/modules/device/native/getDeviceMediaPhotos.tsx

54 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 10279
// Function ID: 10280
2026-07-20 16:05:17 +00:00
// Name: getDeviceMediaPhotos
2026-08-15 05:55:55 +00:00
// Dependencies: [17, 3, 1208, 500, 10280, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 10279 (getDeviceMediaPhotos)
2026-07-23 10:11:24 +00:00
import { NativeModules } from "get ActivityIndicator";
2026-07-29 08:29:29 +00:00
let c4 = new require("set")("DeviceMedia.tsx");
const tmp2 = new require("set")("DeviceMedia.tsx");
const result = require("module_1208").fileFinishedImporting("modules/device/native/getDeviceMediaPhotos.tsx");
2026-07-20 16:05:17 +00:00
export default function getDeviceMediaPhotos(arg0) {
let batchSize;
let endCursor;
let extensions;
let lastAssetIndex;
let lastNodeImageUri;
let onError;
let onFetched;
({ batchSize, extensions, onFetched, onError } = arg0);
({ endCursor, lastAssetIndex, lastNodeImageUri } = arg0);
if (onError === undefined) {
onError = function u(arg0) {
2026-07-29 08:29:29 +00:00
logger.log("CameraRollUtils -- Failed to get photos with error " + arg0);
callback(table[2]).captureException(arg0, { tags: { source: "DEVICE_MEDIA" } });
2026-07-20 16:05:17 +00:00
};
}
2026-07-29 08:29:29 +00:00
let obj = require(500) /* set */;
2026-07-20 16:05:17 +00:00
if (obj.isIOS()) {
2026-08-15 05:55:55 +00:00
const obj3 = importDefault(10280);
2026-07-29 08:29:29 +00:00
if (obj3 != null) {
obj = { first: null, groupTypes: "Recents", assetType: "All", after: null, extensions: null };
obj[0] = batchSize;
obj[3] = endCursor;
obj[4] = extensions;
const photos = obj3.getPhotos(obj);
2026-07-20 16:05:17 +00:00
photos.then(onFetched).catch(onError);
const nextPromise = photos.then(onFetched);
}
} else {
const CameraRollUtils = NativeModules.CameraRollUtils;
2026-07-29 08:29:29 +00:00
obj = { first: null, assetType: "All", after: null, offset: null, extensions: null };
obj[0] = batchSize;
obj[2] = lastNodeImageUri;
obj[3] = lastAssetIndex;
obj[4] = extensions;
2026-07-20 16:05:17 +00:00
const photos1 = CameraRollUtils.getPhotos(obj);
photos1.then(onFetched).catch(onError);
const nextPromise1 = photos1.then(onFetched);
}
};