media-stream-library
Version:
Media stream library for Node & the Web.
27 lines (26 loc) • 848 B
TypeScript
import { Tube } from '../component';
/**
* Component that records MP4 data.
*/
export declare class Mp4Capture extends Tube {
private _active;
private _capture;
private _captureCallback;
private _bufferOffset;
private readonly _bufferSize;
private _buffer;
constructor(maxSize?: number);
/**
* Activate video capture. The capture will begin when a new movie starts,
* and will terminate when the movie ends or when the buffer is full. On
* termination, the callback you passed will be called with the captured
* data as argument.
* @param callback Will be called when data is captured.
*/
start(callback: (buffer: Buffer) => void): void;
/**
* Deactivate video capture. This ends an ongoing capture and prevents
* any further capturing.
*/
stop(): void;
}