refactor(ambilight): [PKG-AMBILIGHT-04] preserve published types and dual CommonJS exports

This commit is contained in:
Harvey Zhao committed 2026-09-12 11:50:22 +08:00
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]