Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@labelbee/wavesurfer
Advanced tools
Interactive navigable audio visualization using Web Audio and Canvas
During the development of this project, we utilized the following external projects and open-source libraries, and we would like to extend our gratitude to the original authors for their contributions:
Please refer to the documentation and licenses of each project/library for more information.
Interactive navigable audio visualization using Web Audio and Canvas.
See a tutorial and examples on wavesurfer-js.org.
wavesurfer.js works only in modern browsers supporting Web Audio.
It will fallback to Audio Element without graphics in other browsers (IE 11 and lower).
Yes, if you use the backend: 'MediaElement'
option. See here: https://wavesurfer-js.org/example/audio-element/. The audio will start playing as you press play. A thin line will be displayed until the whole audio file is downloaded and decoded to draw the waveform.
No. Web Audio needs the whole file to decode it in the browser. You can however load pre-decoded waveform data to draw the waveform immediately. See here: https://wavesurfer-js.org/example/audio-element/ (the "Pre-recoded Peaks" section).
Choose a container:
<div id="waveform"></div>
Create an instance, passing the container selector and options:
var wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: 'violet',
progressColor: 'purple'
});
Subscribe to some events:
wavesurfer.on('ready', function () {
wavesurfer.play();
});
Load an audio file from a URL:
wavesurfer.load('example/media/demo.wav');
See the documentation on all available methods, options and events on the homepage.
See the upgrade document if you're upgrading from a previous version of wavesurfer.js.
Install Wavesurfer:
npm install wavesurfer.js --save
# or
yarn add wavesurfer.js
Use it with a module system like this:
// import
import WaveSurfer from 'wavesurfer.js';
// commonjs/requirejs
var WaveSurfer = require('wavesurfer.js');
// amd
define(['WaveSurfer'], function(WaveSurfer) {
// ... code
});
For a list of projects using wavesurfer.js, check out the projects page.
Install development dependencies:
npm install
Development tasks automatically rebuild certain parts of the library when files are changed (start
– wavesurfer, start:plugins
– plugins). Start a dev task and go to localhost:8080/example/
to test the current build.
Start development server for core library:
npm run start
Start development server for plugins:
npm run start:plugins
Build all the files. (generated files are placed in the dist
directory.)
npm run build
Running tests only:
npm run test
Build documentation with esdoc (generated files are placed in the doc
directory.)
npm run doc
If you want to use the VS Code - Debugger for Chrome, there is already a launch.json with a properly configured sourceMapPathOverrides
for you.
The homepage and documentation files are maintained in the gh-pages
branch. Contributions to the documentation are especially welcome.
When preparing a new release, update the version in the package.json
and have it merged to master. The new version of the package will be published to NPM automatically via GitHub Actions.
The main maintainer: Thijs Triemstra
Many thanks to all the awesome contributors!
FAQs
Interactive navigable audio visualization using Web Audio and Canvas
We found that @labelbee/wavesurfer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.