-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能否加个频谱进去 #14
Comments
|
实现频谱效果的方法有多种,以下是一种简单的实现方式: 使用 Web Audio API 中的 AnalyserNode 对象来获取音频数据的频域信息。 将频域信息转换为频谱图,可以使用 Canvas API 来绘制频谱图。 将绘制好的频谱图添加到音乐播放器的界面中,可以使用 Vue.js 和 Element UI 来实现。 具体实现步骤如下: 在音乐播放器的组件中,创建一个 AudioContext 对象和一个 AnalyserNode 对象,用于获取音频数据的频域信息。 // 创建 AnalyserNode 对象 // 将频域信息转换为频谱图 // 循环调用 drawSpectrum 方法 |
你的邮件我已收到,谢谢!
|
我看到有些人他们用h5写的频谱非常的炫酷,macOSX 上几乎没有有频谱的播放器,你用的是js,所以有天然的优势,可以做到mac第一个支持频谱显示的播放器。
The text was updated successfully, but these errors were encountered: