diff --git a/packages/artplayer/types/option.d.ts b/packages/artplayer/types/option.d.ts index bfd2acf4c..cab255281 100644 --- a/packages/artplayer/types/option.d.ts +++ b/packages/artplayer/types/option.d.ts @@ -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); + 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 any>; + customType?: Partial< + Record any> + >; }; export default Option;