mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
feat: add danmuku plugin and i18n setup documentation
- Created a new documentation file for the danmuku plugin with code examples. - Added a new documentation file for language settings (i18n) with detailed instructions on language imports, default languages, and how to add or modify languages.
This commit is contained in:
1 parent
7dffd99cfd
commit
17042867fc
81 files changed
+160
-878
No files matched your search
+95
@@ -0,0 +1,95 @@
|
||||
interface Option {
|
||||
/**
|
||||
* Upscale factor
|
||||
* @default 2
|
||||
*/
|
||||
scale?: number;
|
||||
/**
|
||||
* Network name for upscaling (required)
|
||||
* e.g., 'anime4k/cnn-2x-m-an'
|
||||
*/
|
||||
networkName: string;
|
||||
/**
|
||||
* Weights for the neural network (required)
|
||||
* Can be a URL string or a pre-loaded weights object
|
||||
* e.g., '/path/to/weights.json' or { layers: [...] }
|
||||
*/
|
||||
weights: string | object;
|
||||
/**
|
||||
* Enable comparison mode
|
||||
* @default false
|
||||
*/
|
||||
compare?: boolean;
|
||||
}
|
||||
|
||||
interface Result {
|
||||
name: 'artplayerPluginWebsr';
|
||||
/**
|
||||
* Get WebSR instance
|
||||
*/
|
||||
websr: () => any;
|
||||
/**
|
||||
* Get GPU context
|
||||
*/
|
||||
gpu: () => any;
|
||||
/**
|
||||
* Get canvas element
|
||||
*/
|
||||
canvas: () => HTMLCanvasElement;
|
||||
/**
|
||||
* Enable WebSR upscaling
|
||||
*/
|
||||
enable: () => Promise<void>;
|
||||
/**
|
||||
* Disable WebSR upscaling
|
||||
*/
|
||||
disable: () => void;
|
||||
/**
|
||||
* Toggle WebSR upscaling
|
||||
*/
|
||||
toggle: () => Promise<void>;
|
||||
/**
|
||||
* Check if WebSR is enabled
|
||||
*/
|
||||
isEnabled: () => boolean;
|
||||
/**
|
||||
* Check if WebSR is initialized
|
||||
*/
|
||||
isInitialized: () => boolean;
|
||||
/**
|
||||
* Update options at runtime
|
||||
* Supported options: enabled, weights, networkName, scale
|
||||
*/
|
||||
update: (option: Partial<Option>) => Promise<void>;
|
||||
/**
|
||||
* Enable comparison mode
|
||||
*/
|
||||
enableCompare: () => void;
|
||||
/**
|
||||
* Disable comparison mode
|
||||
*/
|
||||
disableCompare: () => void;
|
||||
/**
|
||||
* Toggle comparison mode
|
||||
*/
|
||||
toggleCompare: () => void;
|
||||
/**
|
||||
* Set comparison split position (0-1)
|
||||
*/
|
||||
setComparePosition: (pos: number) => void;
|
||||
/**
|
||||
* Get current comparison split position (0-1)
|
||||
*/
|
||||
getComparePosition: () => number;
|
||||
/**
|
||||
* Check if comparison mode is enabled
|
||||
*/
|
||||
isComparing: () => boolean;
|
||||
}
|
||||
|
||||
declare const artplayerPluginWebsr: (option?: Option) => (art: Artplayer) => Result;
|
||||
|
||||
export default artplayerPluginWebsr
|
||||
|
||||
export = artplayerPluginWebsr;
|
||||
export as namespace artplayerPluginWebsr;
|
||||
Reference in new issue
Block a user