mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
PlayerOptions width and height should be strings, adds Player.destroy()
Per https://developers.google.com/youtube/iframe_api_reference PlayerOptions can be other than numbers, in fact in the API reference are created as strings even though they are specified as numbers: '100%' works. Also adds the Player.destroy() method, which removes the iframe from the DOM.
This commit is contained in:
Vendored
+5
-2
@@ -50,8 +50,8 @@ declare module YT {
|
||||
}
|
||||
|
||||
export interface PlayerOptions {
|
||||
width?: number;
|
||||
height?: number;
|
||||
width?: string;
|
||||
height?: string;
|
||||
videoId?: string;
|
||||
playerVars?: PlayerVars;
|
||||
events?: Events;
|
||||
@@ -147,6 +147,9 @@ declare module YT {
|
||||
|
||||
// Event Listener
|
||||
addEventListener(event: string, handler: EventHandler): void;
|
||||
|
||||
// DOM
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export enum PlayerState {
|
||||
|
||||
Reference in New Issue
Block a user