MCAP is a modular container format and logging library for pub/sub messages with arbitrary message serialization. It is primarily intended for use in robotics applications, and works well under various workloads, resource constraints, and durability requirements.
The @mcap/browser
package provides utilities for working with MCAP files in browsers.
import { loadDecompressHandlers } from "@mcap/support";
import { BlobReadable } from "@mcap/browser";
import { McapIndexedReader } from "@mcap/core";
import { open } from "fs/promises";
async function onInputOrDrop(event: InputEvent | DragEvent) {
const file = event.dataTransfer.files[0];
const decompressHandlers = await loadDecompressHandlers();
const reader = await McapIndexedReader.Initialize({
readable: new BlobReadable(file),
decompressHandlers,
});
}
@mcap/browser
is licensed under the MIT License.
Join our Discord community to ask questions, share feedback, and stay up to date on what our team is working on.