mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 22:06:17 -08:00
Update option.d.ts
This commit is contained in:
1 parent
d2d0e2d8db
commit
57f5c44d17
1 file changed
+6
-2
Vendored
+6
-2
@@ -5,6 +5,8 @@ import { I18n } from './i18n';
|
||||
import { ComponentOption } from './component';
|
||||
import Artplayer = require('./artplayer');
|
||||
|
||||
type CustomType = 'flv' | 'm3u8' | 'hls' | 'ts' | 'mpd' | 'torrent' | (string & Record<never, never>);
|
||||
|
||||
export type Option = {
|
||||
/**
|
||||
* The player id
|
||||
@@ -34,7 +36,7 @@ export type Option = {
|
||||
/**
|
||||
* Video url type
|
||||
*/
|
||||
type?: string;
|
||||
type?: CustomType;
|
||||
|
||||
/**
|
||||
* Player color theme
|
||||
@@ -296,7 +298,9 @@ export type Option = {
|
||||
/**
|
||||
* Custom video type function
|
||||
*/
|
||||
customType?: Record<string, (this: Artplayer, video: HTMLVideoElement, url: string, art: Artplayer) => any>;
|
||||
customType?: Partial<
|
||||
Record<CustomType, (this: Artplayer, video: HTMLVideoElement, url: string, art: Artplayer) => any>
|
||||
>;
|
||||
};
|
||||
|
||||
export default Option;
|
||||
Reference in new issue
Block a user