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

2.1.3 • Public • Published

Installation

npm install --save @types/fitvids

Summary

This package contains type definitions for fitvids (https://github.com/rosszurowski/vanilla-fitvids#readme).

Details

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

index.d.ts

/**
 * Lets your videos be responsive by wrapping them in an aspect ratio container.
 */
export as namespace fitvids;

/**
 * The module exports a single function.
 * Just call it, and it'll wrap video embeds from Youtube, Vimeo, and Kickstarter in a responsive container.
 * Other video players can be supported by passing a custom selector via the options.
 *
 * To wrap videos that have been added to the page dynamically, just call the function again.
 * Fitvids is smart enough to only wrap the new videos.
 */
declare function fitvids(
    parentSelector?: string | (Element | null) | NodeListOf<Element>,
    options?: fitvids.Options,
): void;
declare function fitvids(options: fitvids.Options): void;

declare namespace fitvids {
    interface Options {
        /**
         * If you'd like to ignore certain videos, you can pass a selector via the ignore option.
         * @default ""
         */
        ignore?: string | string[] | undefined;
        /**
         * By default, fitvids automatically wraps Youtube, Vimeo, and Kickstarter players,
         * but if you'd like it to wrap others too, you can pass them in as selectors via the players property.
         * @default ""
         */
        players?: string | string[] | undefined;
    }
}

export = fitvids;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

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

Readme

Keywords

none

Package Sidebar

Install

npm i @types/fitvids

Weekly Downloads

498

Version

2.1.3

License

MIT

Unpacked Size

5.14 kB

Total Files

5

Last publish

Collaborators

  • types