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:
Javier
2015-04-21 11:14:03 -07:00
parent cb08e83dd8
commit 90fe3e51ea
+5 -2
View File
@@ -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 {