media-stream-library
Version:
Media stream library for Node & the Web.
21 lines (20 loc) • 666 B
TypeScript
import { Readable } from 'stream';
import { Source } from '../component';
export declare class Replayer extends Source {
/**
* Create a new replay component that will play provided data.
* The packets need to conform to the format:
* {
* type: 'incoming'/'outgoing',
* delay: Number,
* msg: Object (original message)
* }
* @param packetStream - The JSON data to replay.
*/
constructor(packetStream: Readable);
/**
* Create a new replay component that will play from a file.
* @param filename - The name of the file (relative to cwd)
*/
static fromFile(filename?: string): Replayer;
}