refactor: saved all files with prettier formatting

This commit is contained in:
2026-04-26 23:24:09 +03:30
parent f248a293fa
commit affda9ccae
7 changed files with 30 additions and 30 deletions

View File

@@ -5,9 +5,9 @@
* creation: 21/4/2026
*/
import { NativeAdapter } from "../adapters";
import { AdapterAPI, PlayerConfig } from "../types/index";
import { BaseUI } from "../ui";
import { NativeAdapter } from '../adapters';
import { AdapterAPI, PlayerConfig } from '../types/index';
import { BaseUI } from '../ui';
export class VP {
private video: HTMLVideoElement;
@@ -24,10 +24,10 @@ export class VP {
this.config = config;
this.video = this.videoElement(video);
this.videoSrc = this.video?.querySelectorAll<HTMLSourceElement>("source");
this.videoSrc = this.video?.querySelectorAll<HTMLSourceElement>('source');
if (!this.config.type) {
throw new Error("Type not specified in config.");
throw new Error('Type not specified in config.');
}
this.adapter = this.adapterInit(this.config.type);
@@ -65,17 +65,17 @@ https://git.db123.ir/db/VideoPlayer
return videoEl;
}
private adapterInit(type: string = "native"): AdapterAPI {
private adapterInit(type: string = 'native'): AdapterAPI {
switch (type) {
case "native": {
case 'native': {
return new NativeAdapter(this.video);
}
case "hls": {
case 'hls': {
throw new Error(`Adapter not implemented: ${type}`);
}
case "dash": {
case 'dash': {
throw new Error(`Adapter not implemented: ${type}`);
}