![]() ![]() Try to not hard-bind redux-state with wavesurfer-react too tight or use an instance of wavesurfer to operate regions. Issues with regions synchronization when using redux and Region component.Can be used inside any custom component you will create and render within the borders of WaveSurfer component. Is used inside Region component to get wavesurfer instance. That is provided by the package or any other component, that is rendered inside WaveSurfer component,īut for the latter task you will have to get region instance first. Is used inside Region component to subscribe to region related events.Ĭan be used by developers, if they wanna to, inside a HOC-like component over Region component You can use it standalone to create you own (more specific) wavesurfer component that will handle more than a component that is provided out-of-the-box. It also handles a task of creating and destroying wavesurfer plugins, after plugins prop update detection. This hook is used inside WaveSurfer and its purpose is to create wavesurfer instance and return it. Package provides the following set of hooks: Rest passed props are used as marker's data Hooks onDrop is emitted when element is released after drag.onDrag is emitted when drag operation is started.onClick is emitted when marker is clicked.MarkerĬan be used to imperatively control markers.įor now, only time is updatable and is watched for further updates, that are coming from outside of component. Rest given props are passed as region's data into wavesurfer. onUpdateEnd - is called when dragging or resizing are finished.onUpdate - is called on each region's options update.onRemove - is called just before region remove.onOut - is called when playback leaves a region.onIn - is called when playback enters a region.onDoubleClick - is called on double click.onClick - is called on a mouse click on a region.onLeave - is called when moused leaves a region.onOver - is called when mouse enters a region. ![]() If region component did not find appropriate region, then it creates a region itself. On mount, it will try to find region with the same region identifier and then attaches itself to it. ![]() If region is already present of WaveForm it creation will be avoided and existing instance is used. It can be used to imperatively control regions, appearing on WaveForm if you're using RegionsPlugin. Think of it as a some kind of helper component. It accepts all options, passed into WaveSurfer.create, but except plugins. It has only one argument - WaveSurfer instance. It is a function, that is called after WaveSurfer instance has been mounted. Otherwise added to wavesurfer plugins list and immediately initialized. If plugin was disabled (it's not enlisted in plugins prop) it will be destroyed, The plugins prop is watched inside WaveSurfer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |