From 5dfe50c719bf5d4fe0f5e234d2dd118d38413626 Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sat, 19 Oct 2024 13:53:36 +0800 Subject: [PATCH] Add artplayer-plugin-ambilight package and demo --- README.md | 1 + docs/assets/example/ambilight.js | 16 + docs/index.html | 4 + .../artplayer-plugin-ambilight/index.js | 303 ++++++++++++++++++ .../artplayer-plugin-ambilight/index.js.map | 1 + packages/artplayer-plugin-ambilight/README.md | 11 + .../artplayer-plugin-ambilight/package.json | 24 ++ .../artplayer-plugin-ambilight/src/index.js | 119 +++++++ .../types/artplayer-plugin-ambilight.d.ts | 20 ++ .../docs/.vitepress/config.js | 2 + 10 files changed, 501 insertions(+) create mode 100644 docs/assets/example/ambilight.js create mode 100644 docs/uncompiled/artplayer-plugin-ambilight/index.js create mode 100644 docs/uncompiled/artplayer-plugin-ambilight/index.js.map create mode 100644 packages/artplayer-plugin-ambilight/README.md create mode 100644 packages/artplayer-plugin-ambilight/package.json create mode 100644 packages/artplayer-plugin-ambilight/src/index.js create mode 100644 packages/artplayer-plugin-ambilight/types/artplayer-plugin-ambilight.d.ts diff --git a/README.md b/README.md index bc31f2729..dd408d9b2 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ var art = new Artplayer({ - [artplayer-plugin-vast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast) - [artplayer-plugin-chapter](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chapter/index.js&example=chapter) - [artplayer-plugin-auto-thumbnail](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-auto-thumbnail/index.js&example=auto.thumbnail) +- [artplayer-plugin-ambilight](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-ambilight/index.js&example=ambilight) ## Libraries diff --git a/docs/assets/example/ambilight.js b/docs/assets/example/ambilight.js new file mode 100644 index 000000000..4d97c14f1 --- /dev/null +++ b/docs/assets/example/ambilight.js @@ -0,0 +1,16 @@ +// npm i artplayer-plugin-ambilight +// import artplayerPluginAmbilight from 'artplayer-plugin-ambilight'; + +var art = new Artplayer({ + container: '.artplayer-app', + url: '/assets/sample/video.mp4', + autoSize: true, + plugins: [ + artplayerPluginAmbilight({ + blur: '50px', + opacity: 1, + frequency: 10, + duration: 0.3, + }), + ], +}); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 9e18ae04a..6b97d42e0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -103,6 +103,10 @@ artplayer-plugin-auto-thumbnail +
  • + artplayer-plugin-ambilight +