example/annotation/app.js
function saveRegions() {
    localStorage.regions = JSON.stringify(
        Object.keys(wavesurfer.regions.list).map(function(id) {
            var region = wavesurfer.regions.list[id];
            return {
                start: region.start,
                end: region.end,
                attributes: region.attributes,
                data: region.data
            };
        })
    );
}
function saveRegions() {
    localStorage.regions = JSON.stringify(
        Object.keys(wavesurfer.regions.list).map(function(id) {
            var region = wavesurfer.regions.list[id];
            return {
                start: region.start,
                end: region.end,
                attributes: region.attributes,
                data: region.data
            };
        })
    );
}
function saveRegions ( ) { localStorage . regions = JSON . stringify ( Object . keys ( wavesurfer . regions . list ) . map ( function ( id ) { var region = wavesurfer . regions . list [ id ] ; return { start : region . start , end : region . end , attributes : region . attributes , data : region . data } ; } ) ) ; }
Save annotations to localStorage.
Save annotations to localStorage .