2.1.3 • Published 6 months ago

@types/videojs-seek-buttons v2.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/videojs-seek-buttons

Summary

This package contains type definitions for videojs-seek-buttons (https://github.com/mister-ben/videojs-seek-buttons#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/videojs-seek-buttons.

index.d.ts

// Type definitions for videojs-seek-buttons 2.1
// Project: https://github.com/mister-ben/videojs-seek-buttons#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import videojs from 'video.js';

/**
 * A video.js plugin.
 *
 * In the plugin function, the value of `this` is a video.js `Player`
 * instance. You cannot rely on the player being in a "ready" state here,
 * depending on how the plugin is invoked. This may or may not be important
 * to you; if not, remove the wait for "ready"!
 *
 * @param     [options={}]
 *           An object of options left to the plugin author to define.
 */
declare function seekButtons(options?: seekButtons.Options): void;

declare namespace seekButtons {
    const VERSION: typeof videojs.VERSION;
    interface SeekButtonOptions {
        direction: 'forward' | 'back';
        seconds: number;
    }

    class SeekButton extends videojs.Button {
        /**
         * Constructor for class
         *
         * @param player The player
         * @param options Button options
         */
        constructor(player: videojs.Player, options?: SeekButtonOptions);
        /**
         * Return button class names which include the seek amount.
         *
         * @return css class string
         */
        buildCSSClass(): string;
        /**
         * Seek with the button's configured offset
         */
        handleClick(): void;
    }

    interface Options {
        /**
         * if a number greater than 0, a seek forward button will be added which seeks that number of seconds
         */
        forward?: number | undefined;
        /**
         * if a number greater than 0, a seek back button will be added which seeks that number of seconds
         */
        back?: number | undefined;
        /**
         * the position in the control bar to insert the button.
         * @default 1
         */
        forwardIndex?: number | undefined;
        /**
         * the position in the control bar to insert the button
         * @default 1
         */
        backIndex?: number | undefined;
    }
}

export = seekButtons;

declare module 'video.js' {
    interface VideoJsPlayer {
        seekButtons: typeof seekButtons;
    }
    interface VideoJsPlayerPluginOptions {
        seekButtons?: seekButtons.Options;
    }
}

Additional Details

  • Last updated: Thu, 22 Jul 2021 21:01:38 GMT
  • Dependencies: @types/video.js
  • Global values: none

Credits

These definitions were written by Piotr Błażejewicz.

2.1.2

7 months ago

2.1.1

8 months ago

2.1.3

6 months ago

2.1.0

3 years ago