Skip to content

Audio and video recordings in datasets - #26

Merged
hamza-aamer merged 1 commit into
mainfrom
feature/media-upload
Nov 11, 2026
Merged

hamza-aamer merged 1 commit into
mainfrom
feature/media-upload

Conversation

@hamza-aamer

Copy link
Copy Markdown
Contributor

Part of edge-ml/edge-ml#78 (JavaScript library). Uses the device API routes of edge-ml/Dataset-store#31.

What it adds

  • uploadMedia(url, key, datasetId, file, { kind?, name?, start?, fileName? }) – adds an audio or video recording to a dataset and resolves to the stored entry. file is a File/Blob in the browser, and a Buffer, ArrayBuffer or file path in Node.js.
  • sendDataset takes recordings as media: [{ file, start?, ... }]. A dataset that only holds recordings needs no timeSeries.
  • listDatasets(url, key) – the project's datasets with their time-series and recordings (mediaSeries).
  • downloadMedia(url, key, datasetId, mediaId) – the recording as an ArrayBuffer.
  • Types and a README section.

Nothing existing changes: sendDataset and datasetCollector send the same requests as before when no media is given.

Server

The routes are on a server with edge-ml/Dataset-store#31. Until that is promoted, prod answers 404 for these calls; everything else works as before.

Release

No version bump here, so merging does not publish. The release (4.2.0) is a separate PR.

Tests

11 new Jest tests (55 pass), browser bundle check passes. Run live against a local server with this branch's server side: upload from path, Buffer and Blob, dataset with and without time-series, listing, byte-identical download, and the refusals (unsupported format, wrong kind, read key, unknown dataset).

- uploadMedia: add a recording to a dataset from a File/Blob, a Buffer or
  ArrayBuffer, or a file path in Node.js
- sendDataset takes recordings as media, also without time-series
- listDatasets and downloadMedia
@hamza-aamer
hamza-aamer merged commit 18fa241 into main Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant