From 088797acece03ca8c425e4dc3e910eb28a44103a Mon Sep 17 00:00:00 2001 From: Andrea Stagi Date: Thu, 28 Nov 2024 23:42:34 +0100 Subject: [PATCH] feat(types): add video type --- types/index.d.ts | 3 +++ types/plugins/video.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 types/plugins/video.ts diff --git a/types/index.d.ts b/types/index.d.ts index a51794c84a..beedcc3885 100755 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -36,6 +36,8 @@ import { Tooltip } from './plugins/tooltip' import { TrackFocus } from './plugins/track-focus' import { Transfer } from './plugins/transfer' import { UploadDragDrop } from './plugins/upload-dragdrop' +import { VideoPlayer } from './plugins/video' + import { loadFonts } from './plugins/fonts-loader' export { @@ -78,5 +80,6 @@ export { TrackFocus, Transfer, UploadDragDrop, + VideoPlayer, loadFonts } diff --git a/types/plugins/video.ts b/types/plugins/video.ts new file mode 100755 index 0000000000..a7bedf80f9 --- /dev/null +++ b/types/plugins/video.ts @@ -0,0 +1,28 @@ +import { default as BaseComponent } from 'bootstrap/js/dist/base-component' +import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component'; + +declare class VideoPlayer extends BaseComponent { + static get NAME(): string + + /** + * Static method which allows you to get the instance associated + * with a DOM element. + */ + static getInstance: GetInstanceFactory; + /** + * Static method which allows you to get the modal instance associated with + * a DOM element, or create a new one in case it wasn’t initialised + */ + static getOrCreateInstance: GetOrCreateInstanceFactory< + VideoPlayer + >; + + constructor(element: HTMLElement) + + setYouTubeVideo(url: String): void + + _getConfig(config: any): any + +} + +export { VideoPlayer }