mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 04:31:20 -08:00
feat: add link to LLMs resource in README
Implement code changes to enhance functionality and improve performance chore: add initial empty files for artplayer.d.ts, llm.txt, and build-llm.js Refactor Artplayer examples for improved readability and consistency - Updated mobile.js to enhance code formatting and structure. - Refined mpegts.js for better readability and consistency in function usage. - Improved multiple.subtitles.js with clearer structure and modern syntax. - Enhanced setting.test.js for better organization and clarity in settings management. - Streamlined thumbnail.js for consistent formatting. - Updated vast.js for improved readability and consistency in plugin usage. - Refined vtt.thumbnail.js for better code organization. - Enhanced webtorrent.js for improved readability and consistency in async handling. - Updated TypeScript definitions for various plugins to maintain consistency in export statements. - Adjusted package.json linting script to include TypeScript files in the docs/assets/ts directory. - Removed outdated types.test.js file to clean up the test suite. refactor: remove outdated documentation files and update translation script - Deleted i18n.md and option.md documentation files as they are no longer needed. - Updated trans-docs.js to streamline the translation process and improve error handling. - Adjusted plugin template package.json for consistency. - Changed console.log to console.warn in various test files for better logging practices. feat: add danmaku plugin documentation and i18n support - Introduced comprehensive documentation for the Danmaku library, including installation, usage examples, and configuration options. - Added language settings documentation, highlighting the need for manual language imports starting from version 5.1.0. - Updated basic options documentation with detailed descriptions and examples for player configuration options. Refactor documentation for clarity and consistency; update translation script to handle large Markdown chunks refactor: improve documentation clarity and consistency across various components - Updated property descriptions in layers.md and setting.md for better readability. - Enhanced language and structure in index.md, danmuku.md, i18n.md, and option.md to ensure uniformity. - Corrected minor grammatical errors and improved phrasing throughout the documentation. - Ensured consistent formatting in tables and code snippets for better user experience. feat: add build script for generating llm.txt and update translation source directories Refactor build-llm.js to improve concurrency and enhance prompt clarity - Introduced a MAX_CONCURRENT_REQUESTS constant to manage concurrent API requests. - Added a runConcurrent function to handle task execution with a limit on concurrent requests. - Updated the askDeepSeek function to include more informative logging. - Enhanced prompts for summarizing documentation, TypeScript definitions, and JavaScript examples to improve clarity and maintain formatting. - Modified the main function to fetch files concurrently and streamline the summarization process. Increase text chunk size from 5000 to 8000 in summarizeSection function for improved processing of larger files. fix: update lint script to include .js files in the scripts directory
This commit is contained in:
1 parent
987795503b
commit
0a9aadf543
71 files changed
+10851
-1945
No files matched your search
@@ -1,10 +1,10 @@
|
||||
# Global Attributes
|
||||
# Global Properties
|
||||
|
||||
Here, `Global Attributes` refer to the `first-level properties` mounted on the `constructor`. Property names are all in uppercase, subject to change in the future and basically not needed.
|
||||
These `global properties` refer to the top-level properties mounted on the `constructor`. All property names are in uppercase. These are subject to change in the future and are generally not used.
|
||||
|
||||
## DEBUG
|
||||
|
||||
Whether to start `debug` mode, which can print out all built-in events of the video by default is turned off.
|
||||
Whether to enable `debug` mode, which can print all built-in video events. Default is off.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -19,7 +19,7 @@ var art = new Artplayer({
|
||||
|
||||
## STYLE
|
||||
|
||||
Returns the player style text
|
||||
Returns the player's style text.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -29,7 +29,7 @@ console.log(Artplayer.STYLE);
|
||||
|
||||
## CONTEXTMENU
|
||||
|
||||
Whether to enable the right-click context menu, enabled by default.
|
||||
Whether to enable the context menu. Default is on.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -41,9 +41,10 @@ var art = new Artplayer({
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
```
|
||||
|
||||
## NOTICE_TIME
|
||||
|
||||
The display duration of the notification message, in milliseconds, defaults to `2000`
|
||||
The display duration for notification messages, in milliseconds. Default is `2000`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -58,7 +59,7 @@ var art = new Artplayer({
|
||||
|
||||
## SETTING_WIDTH
|
||||
|
||||
The default width of the settings panel, in pixels, defaults to `250`
|
||||
The default width of the settings panel, in pixels. Default is `250`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -75,9 +76,10 @@ var art = new Artplayer({
|
||||
aspectRatio: true,
|
||||
});
|
||||
```
|
||||
|
||||
## SETTING_ITEM_WIDTH
|
||||
|
||||
Set the default width of the settings items in the panel, in pixels, the default is `200`.
|
||||
The default width of settings items in the settings panel, in pixels. Default is `200`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -97,7 +99,7 @@ var art = new Artplayer({
|
||||
|
||||
## SETTING_ITEM_HEIGHT
|
||||
|
||||
Set the default height of the settings items in the panel, in pixels, the default is `35`.
|
||||
The default height of settings items in the settings panel, in pixels. Default is `35`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -117,7 +119,7 @@ var art = new Artplayer({
|
||||
|
||||
## RESIZE_TIME
|
||||
|
||||
Throttle time for the `resize` event, in milliseconds, defaults to `200`
|
||||
The throttle time for `resize` events, in milliseconds. Default is `200`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -136,7 +138,7 @@ art.on('resize', () => {
|
||||
|
||||
## SCROLL_TIME
|
||||
|
||||
Throttle time for the `scroll` event, in milliseconds, defaults to `200`
|
||||
The throttle time for `scroll` events, in milliseconds. Default is `200`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -152,9 +154,10 @@ art.on('scroll', () => {
|
||||
console.log('scroll');
|
||||
});
|
||||
```
|
||||
|
||||
## SCROLL_GAP
|
||||
|
||||
The boundary tolerance distance for the `view` event, in pixels, default is `50`
|
||||
The boundary tolerance distance for `view` events, in pixels. Default is `50`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -173,7 +176,7 @@ art.on('scroll', () => {
|
||||
|
||||
## AUTO_PLAYBACK_MAX
|
||||
|
||||
The maximum number of records for the automatic playback feature, default is `10`
|
||||
The maximum number of records for the auto-playback feature. Default is `10`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -189,7 +192,7 @@ var art = new Artplayer({
|
||||
|
||||
## AUTO_PLAYBACK_MIN
|
||||
|
||||
The minimum duration for the auto playback feature, in seconds, with a default of `5`.
|
||||
The minimum record duration for the auto-playback feature, in seconds. Default is `5`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -205,7 +208,7 @@ var art = new Artplayer({
|
||||
|
||||
## AUTO_PLAYBACK_TIMEOUT
|
||||
|
||||
The delay duration for hiding the auto playback feature, in milliseconds, with a default of `3000`.
|
||||
The hide delay duration for the auto-playback feature, in milliseconds. Default is `3000`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -221,7 +224,7 @@ var art = new Artplayer({
|
||||
|
||||
## RECONNECT_TIME_MAX
|
||||
|
||||
The maximum number of automatic reconnection attempts when a connection error occurs, default is `5`
|
||||
The maximum number of automatic reconnection attempts when a connection error occurs. Default is `5`.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -232,11 +235,10 @@ var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/404.mp4',
|
||||
});
|
||||
```
|
||||
|
||||
## RECONNECT_SLEEP_TIME
|
||||
|
||||
The delay time for the automatic reconnection attempt when a connection error occurs, in milliseconds, default is `1000`
|
||||
The delay time for automatic reconnection when a connection error occurs, in milliseconds. Default is `1000`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -251,9 +253,7 @@ var art = new Artplayer({
|
||||
|
||||
## CONTROL_HIDE_TIME
|
||||
|
||||
...
|
||||
|
||||
Auto-hide delay time for the bottom control bar, measured in milliseconds, default is `3000`
|
||||
The delay time for auto-hiding the bottom control bar, in milliseconds. Default is `3000`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -268,7 +268,7 @@ var art = new Artplayer({
|
||||
|
||||
## DBCLICK_TIME
|
||||
|
||||
Double-click event delay time, measured in milliseconds, default is `300`
|
||||
The delay time for double-click events, in milliseconds. Default is `300`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -287,7 +287,7 @@ art.on('dblclick', () => {
|
||||
|
||||
## DBCLICK_FULLSCREEN
|
||||
|
||||
On desktop, whether to switch to fullscreen on double click, default is `true`
|
||||
On desktop, whether to toggle fullscreen on double-click. Default is `true`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -302,7 +302,7 @@ var art = new Artplayer({
|
||||
|
||||
## MOBILE_DBCLICK_PLAY
|
||||
|
||||
On mobile, whether to toggle play/pause on double click, default is `true`
|
||||
On mobile, whether to toggle play/pause on double-click. Default is `true`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -317,19 +317,7 @@ var art = new Artplayer({
|
||||
|
||||
## MOBILE_CLICK_PLAY
|
||||
|
||||
On mobile, whether to play/pause on single click, default is `false`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
Artplayer.MOBILE_CLICK_PLAY = true;
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
```
|
||||
On mobile devices, whether a tap toggles play/pause, defaults to `false`
|
||||
On mobile, whether to toggle play/pause on single click. Default is `false`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -344,7 +332,7 @@ var art = new Artplayer({
|
||||
|
||||
## AUTO_ORIENTATION_TIME
|
||||
|
||||
On mobile devices, the delay time for auto-rotation, in milliseconds, defaults to `200`
|
||||
On mobile, the delay time for automatic screen rotation, in milliseconds. Default is `200`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -359,7 +347,8 @@ var art = new Artplayer({
|
||||
```
|
||||
|
||||
## INFO_LOOP_TIME
|
||||
Info panel refresh time, unit in milliseconds, default is `1000`
|
||||
|
||||
The refresh interval for the information panel, in milliseconds. Default is `1000`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -376,7 +365,7 @@ art.info.show = true;
|
||||
|
||||
## FAST_FORWARD_VALUE
|
||||
|
||||
On mobile, the multiplier rate of the speed when long-pressing for fast-forward, default is `3`
|
||||
On mobile, the speed multiplier for fast-forward during long press. Default is `3`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -392,8 +381,7 @@ var art = new Artplayer({
|
||||
|
||||
## FAST_FORWARD_TIME
|
||||
|
||||
The time, in milliseconds, to fast-forward when double-tapped, default is `10`
|
||||
On mobile, the delay time of the long-press acceleration, in milliseconds, default is `1000`
|
||||
On mobile, the delay time for fast-forward during long press, in milliseconds. Default is `1000`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -409,7 +397,7 @@ var art = new Artplayer({
|
||||
|
||||
## TOUCH_MOVE_RATIO
|
||||
|
||||
On mobile, the ratio of the speed of sliding left and right to seek, default is `0.5`
|
||||
On mobile, the speed multiplier for progress seeking during left/right swipe. Default is `0.5`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -424,7 +412,7 @@ var art = new Artplayer({
|
||||
|
||||
## VOLUME_STEP
|
||||
|
||||
The step ratio of adjusting volume with shortcuts, default is `0.1`
|
||||
The volume adjustment step for keyboard shortcuts. Default is `0.1`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -439,7 +427,7 @@ var art = new Artplayer({
|
||||
|
||||
## SEEK_STEP
|
||||
|
||||
The increment by which the playback progress is adjusted via keyboard shortcuts, in seconds, the default is `5`
|
||||
The seek adjustment step for keyboard shortcuts, in seconds. Default is `5`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -454,7 +442,7 @@ var art = new Artplayer({
|
||||
|
||||
## PLAYBACK_RATE
|
||||
|
||||
The list of built-in playback speeds, by default `[0.5, 0.75, 1, 1.25, 1.5, 2]`
|
||||
The built-in playback rate options list. Default is `[0.5, 0.75, 1, 1.25, 1.5, 2]`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -474,7 +462,7 @@ art.setting.show = true;
|
||||
|
||||
## ASPECT_RATIO
|
||||
|
||||
Built-in list of video aspect ratios, default is `['default', '4:3', '16:9']`
|
||||
The built-in video aspect ratio options list. Default is `['default', '4:3', '16:9']`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -490,10 +478,10 @@ var art = new Artplayer({
|
||||
|
||||
art.contextmenu.show = true;
|
||||
art.setting.show = true;
|
||||
```
|
||||
|
||||
## FLIP
|
||||
|
||||
Built-in list of video flips, defaults to `['normal', 'horizontal', 'vertical']`
|
||||
List of built-in video flip options, defaults to `['normal', 'horizontal', 'vertical']`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -513,7 +501,7 @@ art.setting.show = true;
|
||||
|
||||
## FULLSCREEN_WEB_IN_BODY
|
||||
|
||||
When in web fullscreen, whether to mount the player under the `body` element, defaults to `true`
|
||||
Whether to mount the player under the `body` element during web fullscreen mode, defaults to `true`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -526,9 +514,10 @@ var art = new Artplayer({
|
||||
fullscreenWeb: true,
|
||||
});
|
||||
```
|
||||
|
||||
## LOG_VERSION
|
||||
|
||||
Setting whether to print the player version, the default is `true`
|
||||
Sets whether to print the player version, defaults to `true`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -543,7 +532,7 @@ var art = new Artplayer({
|
||||
|
||||
## USE_RAF
|
||||
|
||||
Setting whether to use `requestAnimationFrame`, the default is `false`, currently mainly used for smooth progress bar effects
|
||||
Sets whether to use `requestAnimationFrame`, defaults to `false`. Currently mainly used for smooth progress bar effects
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -554,5 +543,4 @@ var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
miniProgressBar: true,
|
||||
});
|
||||
```
|
||||
});
|
||||
Reference in new issue
Block a user