initial TS implementation

This commit is contained in:
Jose B
2023-08-18 14:12:48 -05:00
parent 4dde6f50a4
commit e390bda83e
6 changed files with 19 additions and 284 deletions

View File

@@ -1,5 +1,4 @@
// Override the startRecording method so we can pass the desired stream
// Checkout: https://github.com/katspaugh/wavesurfer.js/blob/fa2bcfe/src/plugins/record.ts
// Source code: https://github.com/katspaugh/wavesurfer.js/blob/fa2bcfe/src/plugins/record.ts
import RecordPlugin from "wavesurfer.js/dist/plugins/record";

View File

@@ -1,12 +0,0 @@
import RegionsPlugin from "wavesurfer.js/dist/plugins/regions";
class CustomRegionsPlugin extends RegionsPlugin {
static create(options) {
return new CustomRegionsPlugin(options);
}
avoidOverlapping(region) {
// Prevent overlapping regions
}
}
export default CustomRegionsPlugin;

View File

@@ -0,0 +1,18 @@
// Source code: https://github.com/katspaugh/wavesurfer.js/blob/fa2bcfe/src/plugins/regions.ts
import RegionsPlugin, {
RegionsPluginOptions,
} from "wavesurfer.js/dist/plugins/regions";
class CustomRegionsPlugin extends RegionsPlugin {
public static create(options?: RegionsPluginOptions) {
return new RegionsPlugin(options);
}
constructor(options?: RegionsPluginOptions) {
super(options);
this["avoidOverlapping"] = () => {};
}
}
export default CustomRegionsPlugin;