From 2d73f7313823d22ad7434872110c207eb58bda6c Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Mon, 28 Jul 2014 23:22:10 +0200 Subject: [PATCH 1/2] Add getVideoData() + interfaces --- youtube/youtube.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index 3f21dcb86..44e98dd84 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -71,6 +71,13 @@ declare module YT { suggestedQuality?: string; } + export interface VideoData + { + video_id: string; + author: string; + title: string; + } + export class Player { // Constructor constructor(id: string, playerOptions: PlayerOptions); @@ -132,6 +139,7 @@ declare module YT { getDuration(): number; getVideoUrl(): string; getVideoEmbedCode(): string; + getVideoData(): VideoData; // Playlist getPlaylist(): any[]; From 7f47a884ea46c73ca44078e960aefc8b3f4fe9a1 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Mon, 28 Jul 2014 23:22:29 +0200 Subject: [PATCH 2/2] Remove trailing spaces from empty lines --- youtube/youtube.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index 44e98dd84..cfdba0efb 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -95,7 +95,7 @@ declare module YT { // Properties size; - + // Playing playVideo(): void; pauseVideo(): void; @@ -122,7 +122,7 @@ declare module YT { getPlaybackRate(): number; setPlaybackRate(suggestedRate:number): void; getAvailablePlaybackRates(): number[]; - + // Behavior setLoop(loopPlaylists: boolean): void; setShuffle(shufflePlaylist: boolean): void; @@ -144,7 +144,7 @@ declare module YT { // Playlist getPlaylist(): any[]; getPlaylistIndex(): number; - + // Event Listener addEventListener(event: string, listener: string): void; }