@types/ccapture.js
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Installation

npm install --save @types/ccapture.js

Summary

This package contains type definitions for ccapture.js (https://github.com/spite/ccapture.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ccapture.js.

index.d.ts

declare class CCapture {
    constructor(settings: CCapture.Settings);

    start(): void;

    capture(canvas: HTMLElement): void;

    stop(): void;

    save(cb?: (blob: Blob) => void): void;
}

declare namespace CCapture {
    interface Settings {
        /**
         * Target framerate for the capture
         */
        framerate?: number | undefined;
        /**
         * Super-sampling of frames to create a motion-blurred frame (0 or 1 make no effect)
         */
        motionBlurFrames?: number | undefined;
        format: "webm" | "gif" | "png" | "jpg" | "ffmpegserver";
        /**
         * Quality for webm/jpg
         */
        quality?: number | undefined;
        /**
         * Name of the files to be exported. if no name is provided, a GUID will be generated
         */
        name?: string | undefined;
        /**
         * Dumps info on the console
         */
        verbose?: boolean | undefined;
        /**
         * Adds a widget with capturing info
         */
        display?: boolean | undefined;
        /**
         * Automatically stops and downloads when reaching that time (seconds).
         * Very convenient for long captures: set it and forget it (remember autoSaveTime!)
         */
        timeLimit?: number | undefined;
        /**
         * It will automatically download the captured data every n seconds (only available for webm/png/jpg)
         */
        autoSaveTime?: number | undefined;
        /**
         * Skip to that mark (seconds)
         */
        startTime?: number | undefined;
        /**
         * Path to the gif worker script
         */
        workersPath?: string | undefined;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Sam Alexander.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ccapture.js

Weekly Downloads

182

Version

1.1.3

License

MIT

Unpacked Size

5.92 kB

Total Files

5

Last publish

Collaborators

  • types