feat(auto-thumbnail): [PKG-AUTO-THUMB-08] add compatible runtime type entry

This commit is contained in:
Harvey Zhao committed 2026-09-14 04:07:59 +08:00
1 parent 7be628a983
commit c4f5dcf17f
27 files changed
+2005 -40

No files matched your search

@@ -1,10 +1,11 @@
import type { Result } from '../types/runtime-api'
import type { Cleanup, ThumbnailHost, ThumbnailOptions } from './types'
import extract from './extraction'
import { readOptions } from './options'
import createSession, { cleanupAll } from './session'
export default function artplayerPluginAutoThumbnail(option: ThumbnailOptions) {
return async (art: ThumbnailHost) => {
return async (art: ThumbnailHost): Promise<Result> => {
const report = (error: unknown) => console.warn('ArtPlayer auto-thumbnail failed:', error)
const session = createSession((config) => {
art.thumbnails = config
@@ -1,11 +1,5 @@
// Internal contracts only. Public declarations retain their historical entrypoint.
export interface ThumbnailOptions {
url?: string
width?: number
number?: number
scale?: number
height?: number
}
// Root declarations retain their historical shape; the opt-in runtime view is shared.
export type { Option as ThumbnailOptions } from '../types/runtime-api'
export interface ExtractionConfig {
url: string