Get File List
Get list of photos and videos in device album.
Interface Description
Interface Type
queryMediaFileParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId | string | ✅ | Device ID |
Return Value
Returns array of media files:
javascript
[
{
name: "IMG_0001.JPG",
ext: 'mp4',
mtime: "2024-01-01 10:00:00",
},
// More files...
]Basic Usage
javascript
// Get device album file list
const mediaFiles = await apiInvoke('queryMediaFile', {
deviceId: 'P72578581E07'
});
console.log(`Total ${mediaFiles.length} files in album`);