From dcf5302ba0cf4ef52fd3e7f7ac3879a0e7b9a4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Roucheray?= Date: Wed, 13 Nov 2019 23:18:54 +0000 Subject: [PATCH] Feat/video js alternative distribution (#40319) * video.js: normalize indentation by using 4 spaces as suggested in README * video.js: add no vtt alternative distribution * video.js: fix typo --- types/video.js/dist/alt/video.core.novtt.d.ts | 6 + types/video.js/index.d.ts | 12892 ++++++++-------- .../test/videojs-alt-distributions-tests.ts | 128 + types/video.js/tsconfig.json | 4 +- 4 files changed, 6583 insertions(+), 6447 deletions(-) create mode 100644 types/video.js/dist/alt/video.core.novtt.d.ts create mode 100644 types/video.js/test/videojs-alt-distributions-tests.ts diff --git a/types/video.js/dist/alt/video.core.novtt.d.ts b/types/video.js/dist/alt/video.core.novtt.d.ts new file mode 100644 index 0000000000..ef28825d4f --- /dev/null +++ b/types/video.js/dist/alt/video.core.novtt.d.ts @@ -0,0 +1,6 @@ +/** + * This provides `video.core.novtt.js` alternative distribution typings : + * `import videojs from 'video.js/dist/alt/video.core.novtt';` + */ +import videojs from "../../index"; +export default videojs; diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index ec8a91ccdb..e6279079af 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -39,6086 +39,3710 @@ export default videojs; export as namespace videojs; declare namespace videojs { - /** - * Adding languages so that they're available to all players. - * Example: `addLanguage('es', { 'Hello': 'Hola' });` - * - * @param code - * The language code or dictionary property - * - * @param data - * The data values to be translated - * - * @return The resulting language dictionary object - */ - function addLanguage(code: string, data: LanguageTranslations): LanguageTranslations; - - /** - * Bind (a.k.a proxy or Context). A simple method for changing the context of a function - * It also stores a unique id on the function so it can be easily removed from events. - * - * @param context - * The object to bind as scope. - * - * @param fn - * The function to be bound to a scope. - * - * @param [uid] - * An optional unique ID for the function to be set - * - * @return The new function that will be bound into the context given - */ - function bind any)>(context: any, fn: F, uid?: number): F; - - /** - * Should create a fake `TimeRange` object which mimics an HTML5 time range instance. - * - * @param start - * The start of a single range or an array of ranges - * - * @param end - * The end of a single range. - */ - function createTimeRanges(start?: number | TimeRange[], end?: number): TimeRange; - - /** - * A suite of browser and device tests from {@link browser}. - * - */ - const browser: Browser; - - const dom: Dom; - - /** - * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in seconds) - * will force a number of leading zeros to cover the length of the guide. - * - * @param seconds - * Number of seconds to be turned into a string - * - * @param guide - * Number (in seconds) to model the string after - * - * @return Time formatted as H:MM:SS or M:SS - */ - function formatTime(seconds: number, guide: number): string; - - /** - * Returns an array of all current players. - * - * @return An array of all players. The array will be in the order that - * `Object.keys` provides, which could potentially vary between - * JavaScript engines. - * - */ - function getAllPlayers(): Player[]; - - /** - * Get a component class object by name - * - * @borrows Component.getComponent as getComponent - */ - const getComponent: typeof Component.getComponent; - - /** - * Get a single player based on an ID or DOM element. - * - * This is useful if you want to check if an element or ID has an associated - * Video.js player, but not create one if it doesn't. - * - * @param id - * An HTML element - `