![]() ![]() Import Wavesurfer from 'react-wavesurfer' Ĭlass M圜omponent extends React. As you can see we are importing the wavesurfer. In my bundle config this is setup to export to window.WaveSurfer require( 'wavesurfer.js') You can also easily extend the core functionality by hooking into the wavesurfer.js callbacks (by defining callback props). Basic Usageįor more advanced examples check the example directory. It can be either a unique CSS3 selector, or a DOM element. Note to contributors: The development workflow has changed, please refer to the Developing & contributing section below for more info. npm install wavesurfer.js To use the library, you will need to include it from your code using CommonJS: var WaveSurfer require ( 'wavesurfer.js' ) Or ES6 syntax: import WaveSurfer from 'wavesurfer.js' Parameters The only required parameter is container. Note: This version does not work for the version 2 (beta) of wavesurfer.js – A version of react-wavesurfer that will work with the new version is in the making. Read more about Prerequisites and common pitfalls at the bottom of this document. comment new region props isResizing, isDragging wavesurfer-js1713 888df0f thijstriemstra closed this as completed in 1716 on thijstriemstra pushed a commit that referenced this issue on regions plugin: use isResizing and isDragging to filter events in reg bf5ecb6 Sign up for free to join this conversation on GitHub. Wavesurfer plugins need to be attached to this global variable for the react component to work. Note: This component expects wavesurfer.js to be available as a global variable ( WaveSurfer). You need to explicitely import the correct files before using the react component! Note: Since v0.8.6 react-wavesurfer no longer comes bundled with the wavesurfer files. ![]() Includes support for the timeline, minimap and regions plugins. ![]()
0 Comments
Leave a Reply. |