From 2df28b987367e8c93d93bbeac328a5c3bcd553d3 Mon Sep 17 00:00:00 2001 From: Adam Eisenreich Date: Mon, 20 Aug 2018 15:11:47 +0200 Subject: [PATCH 1/4] Added textTracks & remoteTextTracks to video.js --- types/video.js/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 0deb3d5a68..036aa1189b 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -3764,6 +3764,18 @@ declare namespace videojs { autoplay(): boolean | string; + /** + * Get the remote {@link TextTrackList} + * @return The current remote text track list + */ + textTracks(): TextTrackList + + /** + * Get the remote {@link TextTrackList} + * @return The current remote text track list + */ + remoteTextTracks(): TextTrackList + /** * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}. It will * automatically removed from the video element whenever the source changes, unless From 86c7d8d495aab98be1a264b8247281eed31687ec Mon Sep 17 00:00:00 2001 From: Adam Eisenreich Date: Wed, 22 Aug 2018 10:38:49 +0200 Subject: [PATCH 2/4] fixup! Added textTracks & remoteTextTracks to video.js --- types/video.js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 036aa1189b..87407dc81d 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -3768,13 +3768,13 @@ declare namespace videojs { * Get the remote {@link TextTrackList} * @return The current remote text track list */ - textTracks(): TextTrackList + textTracks(): TextTrackList; /** * Get the remote {@link TextTrackList} * @return The current remote text track list */ - remoteTextTracks(): TextTrackList + remoteTextTracks(): TextTrackList; /** * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}. It will From b094f321f5ddc4cabfef6b2c4df7e4dbdedceed2 Mon Sep 17 00:00:00 2001 From: Adam Eisenreich Date: Wed, 22 Aug 2018 13:56:00 +0200 Subject: [PATCH 3/4] Fixed Element event handler --- types/video.js/index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 87407dc81d..75884ffb7d 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -2628,7 +2628,8 @@ declare namespace videojs { * the listener function; otherwise, _all_ listeners bound to the * event type(s) will be removed. */ - off(targetOrType?: string | string[], typeOrListener?: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + off(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + off(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Add a listener to an event (or events) on this object or another evented @@ -2653,7 +2654,8 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - on(targetOrType: string | string[], typeOrListener: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + on(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + on(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Add a listener to an event (or events) on this object or another evented @@ -2678,7 +2680,8 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - one(targetOrType: string | string[], typeOrListener: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + one(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + one(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Fire an event on this evented object, causing its listeners to be called. From 1f779ef3af4778bcbe6ee351427e60f6d4960af5 Mon Sep 17 00:00:00 2001 From: Adam Eisenreich Date: Wed, 22 Aug 2018 14:31:00 +0200 Subject: [PATCH 4/4] fixup! Fixed Element event handler --- types/video.js/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 75884ffb7d..db3697b65a 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -2628,7 +2628,7 @@ declare namespace videojs { * the listener function; otherwise, _all_ listeners bound to the * event type(s) will be removed. */ - off(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + off(target?: Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; off(type?: string | string[], listener?: (...args: any[]) => void): void; /** @@ -2654,7 +2654,7 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - on(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + on(target?: Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; on(type?: string | string[], listener?: (...args: any[]) => void): void; /** @@ -2680,7 +2680,7 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - one(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + one(target?: Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; one(type?: string | string[], listener?: (...args: any[]) => void): void; /**