refactor: saved all files with prettier formatting
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user