New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

music-visualization-canvas

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

music-visualization-canvas

music visualization

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

音乐可视化

自己娱乐的作品, 由某音乐 MV 引发的灵感, 自用于一些彩蛋

Demo

https://mengxiong10.github.io/music-visualization-canvas/

安装

$ npm install music-visualization-canvas --save

用法

import MusicVisualization from 'music-visualization-canvas';

const mv = new MusicVisualization({
  src: 'https://music.mp3',
  audioEvents: {
    playing: () => {},
    pause: () => {},
    canplay: () => {},
    error: () => {}
  }
});

// 暂停
mv.stop();

// 播放
mv.start();

api

选项

Key描述默认值
src音频的 url-
elcanvas 插入的 DOM 元素document.body
audioEventsaudio 对象上注册的事件-

方法

方法描述
start开始播放
stop暂停
destroy销毁

Keywords

FAQs

Package last updated on 04 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc