After having created two WaveSurfer objects, wavesurfer and wavesurfer2, I would like to make it so that their regions selected sync when the region selected is updated on one of them. I attempt to do this using the firing of a WaveSurfer Event as mentioned in the documentation for WaveSurfer Regions.
wavesurfer.on('region-update-end', function () {
wavesurfer2.regions.params.regions = wavesurfer.regions.params.regions;
console.log(wavesurfer.regions.params.regions)
});
Although the console log below indicates that the Regions object parameters of the wavesurfer object can be accessed and printed in response to a region resize event, in practice I cannot assign these Regions object parameters to wavesurfer2, and the two regions do not sync.