mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -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 { ComponentOption } from './component';
|
||||||
import Artplayer = require('./artplayer');
|
import Artplayer = require('./artplayer');
|
||||||
|
|
||||||
|
type CustomType = 'flv' | 'm3u8' | 'hls' | 'ts' | 'mpd' | 'torrent' | (string & Record<never, never>);
|
||||||
|
|
||||||
export type Option = {
|
export type Option = {
|
||||||
/**
|
/**
|
||||||
* The player id
|
* The player id
|
||||||
@@ -34,7 +36,7 @@ export type Option = {
|
|||||||
/**
|
/**
|
||||||
* Video url type
|
* Video url type
|
||||||
*/
|
*/
|
||||||
type?: string;
|
type?: CustomType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Player color theme
|
* Player color theme
|
||||||
@@ -296,7 +298,9 @@ export type Option = {
|
|||||||
/**
|
/**
|
||||||
* Custom video type function
|
* 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;
|
export default Option;
|
||||||
Reference in new issue
Block a user