diff --git a/vimeo/froogaloop-2.d.ts b/vimeo/froogaloop-2.d.ts new file mode 100644 index 000000000..950696bc5 --- /dev/null +++ b/vimeo/froogaloop-2.d.ts @@ -0,0 +1,26 @@ +// Type definitions for YouTube [No version numbering] +// Project: http://developer.vimeo.com/player/js-api +// Definitions by: Daz Wilkin +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface VimeoParams { + name:string; + value:any; +} +interface VimeoPlayerAPI { + (method: string): any; + (method: string, callback: (value: any, player_id: any) =>void ): any; + (method: string, value: any): any; + (method: string, value: VimeoParams[]): any; +} +interface VimeoPlayer { + api: VimeoPlayerAPI; + addEvent(eventName: string, callback: (e: any) =>void ): any; + removeEvent(eventName: string): void; + postMessage(method: string, params:VimeoParams[], target): void; + onMessagReceived(event); + storeCallback(eventName: string, callback, target_id: string); + getCallback(eventName: string, target_id: string); + removeCallback(eventName: string, target_id: string); + getDomainFromUrl(url: string): string; +} \ No newline at end of file diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index 34bb04589..805627138 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -9,21 +9,40 @@ module Google.YT { interface Event { (event: any): void; } - interface Events { + export interface Events { onReady?: Event; onPlayback?: Event; onStateChange?: Event; } - interface PlayerVars { + export enum ListType { + search, + user_uploads, + playlist, + } + export interface PlayerVars { autohide?: number; autoplay?: number; cc_load_policy?: any; - color?: any; + color?: string; + controls?: number; + disablekb?: number; + enablejsapi?: number; + end?: number; + fs?: number; + iv_load_policy?: number; + list?: string; + listType?: ListType; + loop?; + modestbranding?: number; + origin?; playerpiid?: string; + playlist?; + rel?: number; showinfo?: number; - theme?: any; + start?: number; + theme?: string; } - interface PlayerOptions { + export interface PlayerOptions { width: number; height: number; videoId: string; @@ -36,7 +55,8 @@ module Google.YT { endSeconds: number; suggestedQuality: string; } - interface Player { + export interface Player { + // Constructor new (string, playerOptions:PlayerOptions): any; @@ -109,4 +129,4 @@ interface YT { PAUSED: number; PLAYING: number; }; -} +} \ No newline at end of file