DefinitelyTyped/types/react-youtube/index.d.ts
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00

55 lines
1.6 KiB
TypeScript

// Type definitions for react-youtube 7.6
// Project: https://github.com/troybetz/react-youtube, https://github.com/compedit/react-youtube
// Definitions by: kgtkr <https://github.com/kgtkr>
// Leo Salgueiro <https://github.com/salguerooo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
export interface PlayerVars {
autoplay?: 0 | 1;
cc_load_policy?: 1;
color?: 'red' | 'white';
controls?: 0 | 1 | 2;
disablekb?: 0 | 1;
enablejsapi?: 0 | 1;
end?: number;
fs?: 0 | 1;
hl?: string;
iv_load_policy?: 1 | 3;
list?: string;
listType?: 'playlist' | 'search' | 'user_uploads';
loop?: 0 | 1;
modestbranding?: 1;
origin?: string;
playlist?: string;
playsinline?: 0 | 1;
rel?: 0 | 1;
showinfo?: 0 | 1;
start?: number;
}
export interface Options {
height?: string;
width?: string;
playerVars?: PlayerVars;
}
export default class YouTube extends React.Component<{
videoId?: string,
id?: string,
className?: string,
containerClassName?: string,
opts?: Options,
onReady?(event: { target: any }): void,
onError?(event: { target: any, data: number }): void,
onPlay?(event: { target: any, data: number }): void,
onPause?(event: { target: any, data: number }): void,
onEnd?(event: { target: any, data: number }): void,
onStateChange?(event: { target: any, data: number }): void,
onPlaybackRateChange?(event: { target: any, data: number }): void,
onPlaybackQualityChange?(event: { target: any, data: string }): void,
}> {
}