From 004f2a81f932472bacbf8d2fdff77d23152026d9 Mon Sep 17 00:00:00 2001 From: db123 Date: Wed, 22 Apr 2026 01:26:13 +0330 Subject: [PATCH] feat: added some basic stuff to class VP still have a long way to become even barely functional but i love where this is going --- src/index.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/index.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..2814aa3 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,26 @@ +/** + * VideoPlayer is a modular private video player build with hls.js and dash.js in mind + * + * author: db123 at db + * 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 {} +}