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:
26
src/index.ts
Normal file
26
src/index.ts
Normal 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 {}
|
||||
}
|
||||
Reference in New Issue
Block a user