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

47 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 9698
// Function ID: 75499
2026-07-20 16:05:17 +00:00
// Name: getDeviceMediaPhotos
2026-07-24 07:16:23 +00:00
// Dependencies: [27, 3, 1184, 477, 9699, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 9698 (getDeviceMediaPhotos)
2026-07-23 10:11:24 +00:00
import { NativeModules } from "get ActivityIndicator";
import importDefaultResult from "set";
2026-07-20 16:05:17 +00:00
importDefaultResult = new importDefaultResult("DeviceMedia.tsx");
2026-07-23 10:11:24 +00:00
const result = require("isNonEmptyString").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-23 10:11:24 +00:00
outer1_4.log("CameraRollUtils -- Failed to get photos with error " + arg0);
outer1_1(outer1_2[2]).captureException(arg0, { tags: { source: "DEVICE_MEDIA" } });
2026-07-20 16:05:17 +00:00
};
}
2026-07-23 10:11:24 +00:00
let obj = require(477) /* set */;
2026-07-20 16:05:17 +00:00
if (obj.isIOS()) {
2026-07-24 07:16:23 +00:00
if (null != importDefault(9699)) {
2026-07-23 10:11:24 +00:00
obj = { first: batchSize, groupTypes: "Recents", assetType: "All", after: endCursor, extensions };
2026-07-24 07:16:23 +00:00
const photos = importDefault(9699).getPhotos(obj);
const obj3 = importDefault(9699);
2026-07-20 16:05:17 +00:00
photos.then(onFetched).catch(onError);
const nextPromise = photos.then(onFetched);
}
} else {
const CameraRollUtils = NativeModules.CameraRollUtils;
obj = { first: batchSize, assetType: "All", after: lastNodeImageUri, offset: lastAssetIndex, extensions };
const photos1 = CameraRollUtils.getPhotos(obj);
photos1.then(onFetched).catch(onError);
const nextPromise1 = photos1.then(onFetched);
}
};