From 497706696195b0a3d9f609ae55796cf387669943 Mon Sep 17 00:00:00 2001 From: db123 Date: Wed, 22 Apr 2026 14:58:18 +0330 Subject: [PATCH] feat: made index main export option only and added plugin type which i will add to it later on --- src/index.ts | 21 ++------------------- src/types/index.ts | 5 +++++ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2814aa3..f9a201d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,22 +5,5 @@ * creation: 21/4/2026 */ -class VP { - videoElement: HTMLElement | null; - videoSources?: NodeListOf; - config?: Array; - - /** - * @param {string} video The targeted video element - * @param {Array} config The config array - */ - constructor(video: string, config: Array = []) { - this.videoElement = document.querySelector(video); - this.videoSources = this.videoElement?.querySelectorAll("source"); - this.config = config; - } - - private adapters(): void {} - private ui(): void {} - private plugins(): void {} -} +export { VP } from "./core/index"; +export type { PlayerConfig, Plugin } from "./types/index"; diff --git a/src/types/index.ts b/src/types/index.ts index c266ac0..b2e788e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -35,3 +35,8 @@ export interface PlayerEvents { onEnd?: () => void; onError?: () => void; } + +export interface Plugin { + name: string; + init(player: any): void; +}