UNPKG

extendable-media-recorder

Version:

An extendable drop-in replacement for the native MediaRecorder.

12 lines (9 loc) 403 B
import { TBlobEventFactoryFactory } from '../types'; export const createBlobEventFactory: TBlobEventFactoryFactory = (nativeBlobEventConstructor) => { return (type, blobEventInit) => { if (nativeBlobEventConstructor === null) { throw new Error('A native BlobEvent could not be created.'); } return new nativeBlobEventConstructor(type, blobEventInit); }; };