I've been playing with HTML5 audio API for a bit and came up with this video spectrum analyzer.
It uses the Color Thief library to grab the frame colors at runtime and uses these colors to create the spectrum bar gradients.
The spectrum itself is drawn onto an HTML5 Canvas and updated using the requestAnimationFrame API.
See the demo below and feel free to explore the code on Github and the official demo page.
This demo works best on Chrome and FireFox.
Adding a macOS widget to a Flutter app using SwiftUI
7 months ago