fix: made type in config required

throws error if not present
This commit is contained in:
2026-04-24 23:55:15 +03:30
parent 6174a6c79b
commit 2e01011dc8
2 changed files with 4 additions and 1 deletions

View File

@@ -26,6 +26,9 @@ export class VP {
this.video = this.videoElement(video);
this.videoSrc = this.video?.querySelectorAll<HTMLSourceElement>("source");
if (!this.config.type) {
throw new Error("Type not specified in config.");
}
this.adapter = this.adapterInit(this.config.type);
if (config.controls) {