diff --git a/src/core/VideoPlayer.ts b/src/core/VideoPlayer.ts new file mode 100644 index 0000000..6449320 --- /dev/null +++ b/src/core/VideoPlayer.ts @@ -0,0 +1,28 @@ +/** + * main player + * + * author: db123 at db + * creation: 21/4/2026 + */ + +import { PlayerConfig, HLSOptions, DASHOptions } from "../types/index"; + +export class VP { + videoElement: HTMLElement | null; + videoSources?: NodeListOf; + config?: PlayerConfig; + + /** + * @param {string} video The targeted video element + * @param {PlayerConfig} config The config array + */ + constructor(video: string, config: PlayerConfig) { + this.config = config; + this.videoElement = document.querySelector(video); + this.videoSources = this.videoElement?.querySelectorAll("source"); + } + + private adapters(): void {} + private ui(): void {} + private plugins(): void {} +} diff --git a/src/core/index.ts b/src/core/index.ts new file mode 100644 index 0000000..1aae2bb --- /dev/null +++ b/src/core/index.ts @@ -0,0 +1 @@ +export { VP } from "./VideoPlayer";