Skip to content

Commit

Permalink
feat(types): add video type
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Nov 28, 2024
1 parent 6856ac5 commit 4a5c555
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -78,5 +80,6 @@ export {
TrackFocus,
Transfer,
UploadDragDrop,
VideoPlayer,
loadFonts
}
33 changes: 33 additions & 0 deletions types/plugins/video.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';

import Player from "video.js/dist/types/player"

declare class VideoPlayer extends BaseComponent {

player: Player;

static get NAME(): string

/**
* Static method which allows you to get the instance associated
* with a DOM element.
*/
static getInstance: GetInstanceFactory<VideoPlayer>;
/**
* 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 }

0 comments on commit 4a5c555

Please sign in to comment.