mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
refactor: update export syntax to default for multiple plugins and adjust package.json formatting
This commit is contained in:
1 parent
f3c0a9a77d
commit
9d966bf696
22 files changed
+102
-116
No files matched your search
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:all": "npm run build all && npm run build:i18n && npm run build:ts && npm run build:docs",
|
"build:all": "npm run build all && npm run build:i18n && npm run build:ts && npm run build:docs",
|
||||||
"lint": "npx eslint packages/*/src --fix",
|
"lint": "npx eslint packages/*/{src,types,package.json} --fix",
|
||||||
"build:ts": "node ./scripts/build-ts.js",
|
"build:ts": "node ./scripts/build-ts.js",
|
||||||
"build:docs": "node ./scripts/build-docs.js",
|
"build:docs": "node ./scripts/build-docs.js",
|
||||||
"build:i18n": "node ./scripts/build-i18n.js",
|
"build:i18n": "node ./scripts/build-i18n.js",
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginAds
|
|
||||||
export as namespace artplayerPluginAds;
|
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
/**
|
/**
|
||||||
* 广告源文本,支持视频链接、图片链接、HTML文本
|
* 广告源文本,支持视频链接、图片链接、HTML文本
|
||||||
@@ -50,3 +47,5 @@ interface Ads {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginAds: (option: Option) => (art: Artplayer) => Ads
|
declare const artplayerPluginAds: (option: Option) => (art: Artplayer) => Ads
|
||||||
|
|
||||||
|
export default artplayerPluginAds
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginAmbilight
|
|
||||||
export as namespace artplayerPluginAmbilight;
|
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
blur?: string
|
blur?: string
|
||||||
opacity?: number
|
opacity?: number
|
||||||
@@ -18,3 +15,5 @@ interface Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginAmbilight: (option: Option) => (art: Artplayer) => Result
|
declare const artplayerPluginAmbilight: (option: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerPluginAmbilight
|
||||||
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginAutoThumbnail
|
|
||||||
export as namespace artplayerPluginAutoThumbnail;
|
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
url?: string
|
url?: string
|
||||||
width?: number
|
width?: number
|
||||||
@@ -15,3 +12,5 @@ interface Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginAutoThumbnail: (option: Option) => (art: Artplayer) => Result
|
declare const artplayerPluginAutoThumbnail: (option: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerPluginAutoThumbnail
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginChapter
|
|
||||||
export as namespace artplayerPluginChapter;
|
|
||||||
|
|
||||||
type Chapters = {
|
type Chapters = {
|
||||||
start: number
|
start: number
|
||||||
end: number
|
end: number
|
||||||
@@ -19,3 +16,5 @@ interface Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginChapter: (option: Option) => (art: Artplayer) => Result
|
declare const artplayerPluginChapter: (option: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerPluginChapter
|
||||||
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginChromecast
|
|
||||||
export as namespace artplayerPluginChromecast;
|
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
url?: string
|
url?: string
|
||||||
sdk?: string
|
sdk?: string
|
||||||
@@ -15,3 +12,5 @@ interface Chromecast {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginChromecast: (option: Option) => (art: Artplayer) => Chromecast
|
declare const artplayerPluginChromecast: (option: Option) => (art: Artplayer) => Chromecast
|
||||||
|
|
||||||
|
export default artplayerPluginChromecast
|
||||||
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginDanmukuMask
|
|
||||||
export as namespace artplayerPluginDanmukuMask;
|
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
solutionPath?: string
|
solutionPath?: string
|
||||||
modelSelection?: number
|
modelSelection?: number
|
||||||
@@ -23,3 +20,5 @@ interface Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginDanmukuMask: (option?: Option) => (art: Artplayer) => Result
|
declare const artplayerPluginDanmukuMask: (option?: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerPluginDanmukuMask
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginDanmuku
|
|
||||||
export as namespace artplayerPluginDanmuku;
|
|
||||||
|
|
||||||
type Mode = 0 | 1 | 2
|
type Mode = 0 | 1 | 2
|
||||||
type Danmuku = Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>
|
type Danmuku = Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>
|
||||||
|
|
||||||
@@ -253,3 +250,5 @@ interface Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare const artplayerPluginDanmuku: (option: Option) => (art: Artplayer) => Result
|
declare const artplayerPluginDanmuku: (option: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerPluginDanmuku
|
||||||
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginDashControl
|
|
||||||
export as namespace artplayerPluginDashControl;
|
|
||||||
|
|
||||||
interface Config {
|
interface Config {
|
||||||
control?: boolean
|
control?: boolean
|
||||||
setting?: boolean
|
setting?: boolean
|
||||||
@@ -15,3 +12,5 @@ declare const artplayerPluginDashControl: (option: { quality?: Config, audio?: C
|
|||||||
name: 'artplayerPluginDashControl'
|
name: 'artplayerPluginDashControl'
|
||||||
update: () => void
|
update: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default artplayerPluginDashControl
|
||||||
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginHlsControl
|
|
||||||
export as namespace artplayerPluginHlsControl;
|
|
||||||
|
|
||||||
interface Config {
|
interface Config {
|
||||||
control?: boolean
|
control?: boolean
|
||||||
setting?: boolean
|
setting?: boolean
|
||||||
@@ -15,3 +12,5 @@ declare const artplayerPluginHlsControl: (option: { quality?: Config, audio?: Co
|
|||||||
name: 'artplayerPluginHlsControl'
|
name: 'artplayerPluginHlsControl'
|
||||||
update: () => void
|
update: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default artplayerPluginHlsControl
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
export = ArtplayerPluginIframe
|
|
||||||
export as namespace ArtplayerPluginIframe;
|
|
||||||
|
|
||||||
interface Message {
|
interface Message {
|
||||||
type: string
|
type: string
|
||||||
data: any
|
data: any
|
||||||
@@ -15,7 +12,7 @@ declare class ArtplayerPluginIframe {
|
|||||||
static onMessage(event: MessageEvent & { data: Message }): void
|
static onMessage(event: MessageEvent & { data: Message }): void
|
||||||
static inject(): void
|
static inject(): void
|
||||||
|
|
||||||
readonly promises: Record<number, { resove: Function, reject: Function }>
|
readonly promises: Record<number, { resove: (...args: any[]) => any, reject: (...args: any[]) => any }>
|
||||||
readonly injected: boolean
|
readonly injected: boolean
|
||||||
readonly destroyed: boolean
|
readonly destroyed: boolean
|
||||||
readonly $iframe: HTMLIFrameElement
|
readonly $iframe: HTMLIFrameElement
|
||||||
@@ -28,3 +25,5 @@ declare class ArtplayerPluginIframe {
|
|||||||
message(callback: (...args: any[]) => any): void
|
message(callback: (...args: any[]) => any): void
|
||||||
destroy(): void
|
destroy(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default ArtplayerPluginIframe
|
||||||
@@ -2,9 +2,6 @@ import type SubtitlesOctopus from '@hrgui/libass-wasm-ts'
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
import type { Options } from 'libass-wasm'
|
import type { Options } from 'libass-wasm'
|
||||||
|
|
||||||
export = artplayerPluginAss
|
|
||||||
export as namespace artplayerPluginAss;
|
|
||||||
|
|
||||||
declare const artplayerPluginAss: (options: Options) => (art: Artplayer) => {
|
declare const artplayerPluginAss: (options: Options) => (art: Artplayer) => {
|
||||||
name: 'artplayerPluginLibass'
|
name: 'artplayerPluginLibass'
|
||||||
libass: SubtitlesOctopus
|
libass: SubtitlesOctopus
|
||||||
@@ -15,3 +12,5 @@ declare const artplayerPluginAss: (options: Options) => (art: Artplayer) => {
|
|||||||
hide: () => void
|
hide: () => void
|
||||||
destroy: () => void
|
destroy: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default artplayerPluginAss
|
||||||
Vendored
+2
-3
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginMultipleSubtitles
|
|
||||||
export as namespace artplayerPluginMultipleSubtitles;
|
|
||||||
|
|
||||||
declare const artplayerPluginMultipleSubtitles: (option: {
|
declare const artplayerPluginMultipleSubtitles: (option: {
|
||||||
subtitles: {
|
subtitles: {
|
||||||
url?: string
|
url?: string
|
||||||
@@ -14,3 +11,5 @@ declare const artplayerPluginMultipleSubtitles: (option: {
|
|||||||
}) => (art: Artplayer) => {
|
}) => (art: Artplayer) => {
|
||||||
name: 'multipleSubtitles'
|
name: 'multipleSubtitles'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default artplayerPluginMultipleSubtitles
|
||||||
@@ -1,30 +1,30 @@
|
|||||||
{
|
{
|
||||||
"license": "MIT",
|
"name": "artplayer-plugin-vtt-thumbnail",
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"name": "artplayer-plugin-vtt-thumbnail",
|
"description": "vtt thumbnail plugin for ArtPlayer",
|
||||||
"description": "vtt thumbnail plugin for ArtPlayer",
|
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||||
"main": "dist/artplayer-plugin-vtt-thumbnail.js",
|
"license": "MIT",
|
||||||
"legacy": "dist/artplayer-plugin-vtt-thumbnail.legacy.js",
|
"homepage": "https://artplayer.org",
|
||||||
"module": "dist/artplayer-plugin-vtt-thumbnail.esm.js",
|
"repository": {
|
||||||
"types": "types/artplayer-plugin-vtt-thumbnail.d.ts",
|
"type": "git",
|
||||||
"exports": {
|
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||||
"import": "./dist/artplayer-plugin-vtt-thumbnail.esm.js",
|
},
|
||||||
"require": "./dist/artplayer-plugin-vtt-thumbnail.js",
|
"bugs": {
|
||||||
"default": "./dist/artplayer-plugin-vtt-thumbnail.js"
|
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||||
},
|
},
|
||||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
"keywords": [
|
||||||
"browserslist": "last 1 Chrome version",
|
"html5",
|
||||||
"homepage": "https://artplayer.org",
|
"video",
|
||||||
"repository": {
|
"player"
|
||||||
"type": "git",
|
],
|
||||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
"exports": {
|
||||||
},
|
"import": "./dist/artplayer-plugin-vtt-thumbnail.esm.js",
|
||||||
"bugs": {
|
"require": "./dist/artplayer-plugin-vtt-thumbnail.js",
|
||||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
"default": "./dist/artplayer-plugin-vtt-thumbnail.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"main": "dist/artplayer-plugin-vtt-thumbnail.js",
|
||||||
"html5",
|
"legacy": "dist/artplayer-plugin-vtt-thumbnail.legacy.js",
|
||||||
"video",
|
"module": "dist/artplayer-plugin-vtt-thumbnail.esm.js",
|
||||||
"player"
|
"types": "types/artplayer-plugin-vtt-thumbnail.d.ts",
|
||||||
]
|
"browserslist": "last 1 Chrome version"
|
||||||
}
|
}
|
||||||
+2
-3
@@ -1,10 +1,9 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginVttThumbnail
|
|
||||||
export as namespace artplayerPluginVttThumbnail;
|
|
||||||
|
|
||||||
declare const artplayerPluginVttThumbnail: (option: { vtt?: string, style?: Partial<CSSStyleDeclaration> }) => (
|
declare const artplayerPluginVttThumbnail: (option: { vtt?: string, style?: Partial<CSSStyleDeclaration> }) => (
|
||||||
art: Artplayer,
|
art: Artplayer,
|
||||||
) => {
|
) => {
|
||||||
name: 'artplayerPluginVttThumbnail'
|
name: 'artplayerPluginVttThumbnail'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default artplayerPluginVttThumbnail
|
||||||
@@ -1,30 +1,30 @@
|
|||||||
{
|
{
|
||||||
"license": "MIT",
|
"name": "artplayer-proxy-canvas",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"name": "artplayer-proxy-canvas",
|
"description": "canvas proxy for ArtPlayer",
|
||||||
"description": "canvas proxy for ArtPlayer",
|
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||||
"main": "dist/artplayer-proxy-canvas.js",
|
"license": "MIT",
|
||||||
"legacy": "dist/artplayer-proxy-canvas.legacy.js",
|
"homepage": "https://artplayer.org",
|
||||||
"module": "dist/artplayer-proxy-canvas.esm.js",
|
"repository": {
|
||||||
"types": "types/artplayer-proxy-canvas.d.ts",
|
"type": "git",
|
||||||
"exports": {
|
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||||
"import": "./dist/artplayer-proxy-canvas.esm.js",
|
},
|
||||||
"require": "./dist/artplayer-proxy-canvas.js",
|
"bugs": {
|
||||||
"default": "./dist/artplayer-proxy-canvas.js"
|
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||||
},
|
},
|
||||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
"keywords": [
|
||||||
"browserslist": "last 1 Chrome version",
|
"html5",
|
||||||
"homepage": "https://artplayer.org",
|
"video",
|
||||||
"repository": {
|
"player"
|
||||||
"type": "git",
|
],
|
||||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
"exports": {
|
||||||
},
|
"import": "./dist/artplayer-proxy-canvas.esm.js",
|
||||||
"bugs": {
|
"require": "./dist/artplayer-proxy-canvas.js",
|
||||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
"default": "./dist/artplayer-proxy-canvas.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"main": "dist/artplayer-proxy-canvas.js",
|
||||||
"html5",
|
"legacy": "dist/artplayer-proxy-canvas.legacy.js",
|
||||||
"video",
|
"module": "dist/artplayer-proxy-canvas.esm.js",
|
||||||
"player"
|
"types": "types/artplayer-proxy-canvas.d.ts",
|
||||||
]
|
"browserslist": "last 1 Chrome version"
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerProxyCanvas
|
|
||||||
export as namespace artplayerProxyCanvas;
|
|
||||||
|
|
||||||
type Option = (ctx: CanvasRenderingContext2D, video: HTMLVideoElement) => void
|
type Option = (ctx: CanvasRenderingContext2D, video: HTMLVideoElement) => void
|
||||||
|
|
||||||
type Result = HTMLCanvasElement
|
type Result = HTMLCanvasElement
|
||||||
|
|
||||||
declare const artplayerProxyCanvas: (option: Option) => (art: Artplayer) => Result
|
declare const artplayerProxyCanvas: (option: Option) => (art: Artplayer) => Result
|
||||||
|
|
||||||
|
export default artplayerProxyCanvas
|
||||||
+6
-9
@@ -4,16 +4,13 @@ import type { Events } from './events'
|
|||||||
import type { I18n } from './i18n'
|
import type { I18n } from './i18n'
|
||||||
import type { Icons } from './icons'
|
import type { Icons } from './icons'
|
||||||
import type { Option } from './option'
|
import type { Option } from './option'
|
||||||
|
import type { Player } from './player'
|
||||||
import type { Setting, SettingOption } from './setting'
|
import type { Setting, SettingOption } from './setting'
|
||||||
import type { Subtitle } from './subtitle'
|
import type { Subtitle } from './subtitle'
|
||||||
import type { Template } from './template'
|
import type { Template } from './template'
|
||||||
import type { Utils } from './utils'
|
import type { Utils } from './utils'
|
||||||
import { Player } from './player'
|
|
||||||
|
|
||||||
export = Artplayer
|
export default class Artplayer extends Player {
|
||||||
export as namespace Artplayer;
|
|
||||||
|
|
||||||
declare class Artplayer extends Player {
|
|
||||||
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
|
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
|
||||||
|
|
||||||
get Config(): Config
|
get Config(): Config
|
||||||
@@ -36,7 +33,7 @@ declare class Artplayer extends Player {
|
|||||||
static readonly config: Config
|
static readonly config: Config
|
||||||
static readonly utils: Utils
|
static readonly utils: Utils
|
||||||
static readonly scheme: Record<keyof Option, any>
|
static readonly scheme: Record<keyof Option, any>
|
||||||
static readonly Emitter: Function
|
static readonly Emitter: (...args: any[]) => any
|
||||||
static readonly validator: <T extends object>(option: T, scheme: object) => T
|
static readonly validator: <T extends object>(option: T, scheme: object) => T
|
||||||
static readonly kindOf: (item: any) => string
|
static readonly kindOf: (item: any) => string
|
||||||
static readonly html: Artplayer['template']['html']
|
static readonly html: Artplayer['template']['html']
|
||||||
@@ -95,13 +92,13 @@ declare class Artplayer extends Player {
|
|||||||
on<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): unknown
|
on<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): unknown
|
||||||
once<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): unknown
|
once<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): unknown
|
||||||
emit<T extends keyof Events>(name: T, ...args: unknown[]): unknown
|
emit<T extends keyof Events>(name: T, ...args: unknown[]): unknown
|
||||||
off<T extends keyof Events>(name: T, callback?: Function): unknown
|
off<T extends keyof Events>(name: T, callback?: ((...args: Events[T]) => unknown)): unknown
|
||||||
|
|
||||||
query: Artplayer['template']['query']
|
query: Artplayer['template']['query']
|
||||||
proxy: Artplayer['events']['proxy']
|
proxy: Artplayer['events']['proxy']
|
||||||
video: Artplayer['template']['$video']
|
video: Artplayer['template']['$video']
|
||||||
|
|
||||||
e: Record<keyof Events, { fn: Function, ctx: unknown }[]>
|
e: Record<keyof Events, { fn: (...args: any[]) => any, ctx: unknown }[]>
|
||||||
|
|
||||||
destroy(removeHtml?: boolean): void
|
destroy(removeHtml?: boolean): void
|
||||||
|
|
||||||
@@ -166,7 +163,7 @@ declare class Artplayer extends Player {
|
|||||||
readonly hotkey: {
|
readonly hotkey: {
|
||||||
keys: Record<string, ((event: Event) => any)[]>
|
keys: Record<string, ((event: Event) => any)[]>
|
||||||
add: (key: string, callback: (this: Artplayer, event: Event) => any) => Artplayer['hotkey']
|
add: (key: string, callback: (this: Artplayer, event: Event) => any) => Artplayer['hotkey']
|
||||||
remove: (key: string, callback: Function) => Artplayer['hotkey']
|
remove: (key: string, callback: (event: Event) => any) => Artplayer['hotkey']
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly mask: Component
|
readonly mask: Component
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import Artplayer = require('./artplayer')
|
import type Artplayer from './artplayer'
|
||||||
|
|
||||||
export interface Selector {
|
export interface Selector {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,3 +1,4 @@
|
|||||||
|
import type Artplayer from './artplayer'
|
||||||
import type { ComponentOption } from './component'
|
import type { ComponentOption } from './component'
|
||||||
import type { CssVar } from './cssVar'
|
import type { CssVar } from './cssVar'
|
||||||
import type { I18n } from './i18n'
|
import type { I18n } from './i18n'
|
||||||
@@ -5,7 +6,6 @@ import type { Icons } from './icons'
|
|||||||
import type { Quality } from './quality'
|
import type { Quality } from './quality'
|
||||||
import type { Setting } from './setting'
|
import type { Setting } from './setting'
|
||||||
import type { Subtitle } from './subtitle'
|
import type { Subtitle } from './subtitle'
|
||||||
import Artplayer = require('./artplayer')
|
|
||||||
|
|
||||||
export type CustomType = 'flv' | 'm3u8' | 'hls' | 'ts' | 'mpd' | 'torrent' | (string & Record<never, never>)
|
export type CustomType = 'flv' | 'm3u8' | 'hls' | 'ts' | 'mpd' | 'torrent' | (string & Record<never, never>)
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ export interface Option {
|
|||||||
* Other video attribute
|
* Other video attribute
|
||||||
*/
|
*/
|
||||||
moreVideoAttr?: Partial<{
|
moreVideoAttr?: Partial<{
|
||||||
[key in keyof HTMLVideoElement as HTMLVideoElement[key] extends Function ? never : key]: HTMLVideoElement[key];
|
[key in keyof HTMLVideoElement as HTMLVideoElement[key] extends (...args: any[]) => any ? never : key]: HTMLVideoElement[key];
|
||||||
}>
|
}>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Vendored
+5
-2
@@ -25,10 +25,8 @@ export declare class Player {
|
|||||||
set flip(state: Flip)
|
set flip(state: Flip)
|
||||||
get fullscreen(): boolean
|
get fullscreen(): boolean
|
||||||
set fullscreen(state: boolean)
|
set fullscreen(state: boolean)
|
||||||
set fullscreenToggle(state: boolean)
|
|
||||||
get fullscreenWeb(): boolean
|
get fullscreenWeb(): boolean
|
||||||
set fullscreenWeb(state: boolean)
|
set fullscreenWeb(state: boolean)
|
||||||
set fullscreenWebToggle(state: boolean)
|
|
||||||
get loaded(): number
|
get loaded(): number
|
||||||
get loadedTime(): number
|
get loadedTime(): number
|
||||||
get mini(): boolean
|
get mini(): boolean
|
||||||
@@ -47,8 +45,11 @@ export declare class Player {
|
|||||||
get x(): number
|
get x(): number
|
||||||
get y(): number
|
get y(): number
|
||||||
set seek(time: number)
|
set seek(time: number)
|
||||||
|
get seek(): number
|
||||||
set forward(time: number)
|
set forward(time: number)
|
||||||
|
get forward(): number
|
||||||
set backward(time: number)
|
set backward(time: number)
|
||||||
|
get backward(): number
|
||||||
get url(): string
|
get url(): string
|
||||||
set url(url: string)
|
set url(url: string)
|
||||||
get volume(): number
|
get volume(): number
|
||||||
@@ -62,7 +63,9 @@ export declare class Player {
|
|||||||
get subtitleOffset(): number
|
get subtitleOffset(): number
|
||||||
set subtitleOffset(time: number)
|
set subtitleOffset(time: number)
|
||||||
set switch(url: string)
|
set switch(url: string)
|
||||||
|
get switch(): string
|
||||||
set quality(quality: Quality[])
|
set quality(quality: Quality[])
|
||||||
|
get quality(): Quality[]
|
||||||
get thumbnails(): Thumbnails
|
get thumbnails(): Thumbnails
|
||||||
set thumbnails(thumbnails: Thumbnails)
|
set thumbnails(thumbnails: Thumbnails)
|
||||||
pause(): void
|
pause(): void
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import Artplayer = require('./artplayer')
|
import type Artplayer from './artplayer'
|
||||||
|
|
||||||
type Props<T> = {
|
type Props<T> = {
|
||||||
html: string
|
html: string
|
||||||
@@ -13,7 +13,7 @@ type Props<T> = {
|
|||||||
$parent: Setting
|
$parent: Setting
|
||||||
$parents: Setting[]
|
$parents: Setting[]
|
||||||
$option: Setting[]
|
$option: Setting[]
|
||||||
$events: Function[]
|
$events: Array<(...args: any[]) => any>
|
||||||
$formatted: boolean
|
$formatted: boolean
|
||||||
} & Omit<T, 'html' | 'icon' | 'tooltip'>
|
} & Omit<T, 'html' | 'icon' | 'tooltip'>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user