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
This commit is contained in:
2026-04-22 01:26:13 +03:30
parent 9b9413af6d
commit 004f2a81f9

26
src/index.ts Normal file
View File

@@ -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<HTMLSourceElement>;
config?: Array<string | boolean>;
/**
* @param {string} video The targeted video element
* @param {Array<string>} config The config array
*/
constructor(video: string, config: Array<string | boolean> = []) {
this.videoElement = document.querySelector(video);
this.videoSources = this.videoElement?.querySelectorAll("source");
this.config = config;
}
private adapters(): void {}
private ui(): void {}
private plugins(): void {}
}