mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
refactor(ambilight): [PKG-AMBILIGHT-04] preserve published types and dual CommonJS exports
This commit is contained in:
1 parent
6caee44dbf
commit
959cccf515
30 files changed
+877
-69
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import Artplayer from 'artplayer'
|
||||
import ambilight from 'artplayer-plugin-ambilight'
|
||||
|
||||
const option = { blur: '50px', opacity: 0.5, frequency: 10, zIndex: 9, duration: 0.3 }
|
||||
const art = new Artplayer({ container: '#player', url: 'video.mp4', plugins: [ambilight(option)] })
|
||||
const result = ambilight(option)(art)
|
||||
const name: 'artplayerPluginAmbilight' = result.name
|
||||
const calls: void[] = [result.start(), result.stop()]
|
||||
const accepted: Parameters<typeof ambilight>[0] = option
|
||||
void [name, calls, accepted]
|
||||
Reference in new issue
Block a user