From 47187c5605b0474154321936772de90e87610dd8 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Mon, 28 Aug 2023 18:07:40 +0200 Subject: [PATCH 1/2] Update wavesurfer.min.js Signed-off-by: Lorenzo Mangani --- web/js/wavesurfer.min.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web/js/wavesurfer.min.js b/web/js/wavesurfer.min.js index 8fc39cd..042c6aa 100644 --- a/web/js/wavesurfer.min.js +++ b/web/js/wavesurfer.min.js @@ -1,6 +1,7 @@ -/*! wavesurfer.js 1.3.2 (Sun, 12 Feb 2017 22:43:33 GMT) -* https://github.com/katspaugh/wavesurfer.js -* @license CC-BY-3.0 */ -!function(a,b){"function"==typeof define&&define.amd?define("wavesurfer",[],function(){return a.WaveSurfer=b()}):"object"==typeof exports?module.exports=b():a.WaveSurfer=b()}(this,function(){"use strict";var a={defaultParams:{height:128,waveColor:"#999",progressColor:"#555",cursorColor:"#333",cursorWidth:1,skipLength:2,minPxPerSec:20,pixelRatio:window.devicePixelRatio||screen.deviceXDPI/screen.logicalXDPI,fillParent:!0,scrollParent:!1,hideScrollbar:!1,normalize:!1,audioContext:null,container:null,dragSelection:!0,loopSelection:!0,audioRate:1,interact:!0,splitChannels:!1,mediaContainer:null,mediaControls:!1,renderer:"MultiCanvas",backend:"WebAudio",mediaType:"audio",autoCenter:!0,partialRender:!1},init:function(b){if(this.params=a.util.extend({},this.defaultParams,b),this.container="string"==typeof b.container?document.querySelector(this.params.container):this.params.container,!this.container)throw new Error("Container element not found");if(null==this.params.mediaContainer?this.mediaContainer=this.container:"string"==typeof this.params.mediaContainer?this.mediaContainer=document.querySelector(this.params.mediaContainer):this.mediaContainer=this.params.mediaContainer,!this.mediaContainer)throw new Error("Media Container element not found");this.savedVolume=0,this.isMuted=!1,this.tmpEvents=[],this.currentAjax=null,this.createDrawer(),this.createBackend(),this.createPeakCache(),this.isDestroyed=!1},createDrawer:function(){var b=this;this.drawer=Object.create(a.Drawer[this.params.renderer]),this.drawer.init(this.container,this.params),this.drawer.on("redraw",function(){b.drawBuffer(),b.drawer.progress(b.backend.getPlayedPercents())}),this.drawer.on("click",function(a,c){setTimeout(function(){b.seekTo(c)},0)}),this.drawer.on("scroll",function(a){b.params.partialRender&&b.drawBuffer(),b.fireEvent("scroll",a)})},createBackend:function(){var b=this;this.backend&&this.backend.destroy(),"AudioElement"==this.params.backend&&(this.params.backend="MediaElement"),"WebAudio"!=this.params.backend||a.WebAudio.supportsWebAudio()||(this.params.backend="MediaElement"),this.backend=Object.create(a[this.params.backend]),this.backend.init(this.params),this.backend.on("finish",function(){b.fireEvent("finish")}),this.backend.on("play",function(){b.fireEvent("play")}),this.backend.on("pause",function(){b.fireEvent("pause")}),this.backend.on("audioprocess",function(a){b.drawer.progress(b.backend.getPlayedPercents()),b.fireEvent("audioprocess",a)})},createPeakCache:function(){this.params.partialRender&&(this.peakCache=Object.create(a.PeakCache),this.peakCache.init())},getDuration:function(){return this.backend.getDuration()},getCurrentTime:function(){return this.backend.getCurrentTime()},play:function(a,b){this.fireEvent("interaction",this.play.bind(this,a,b)),this.backend.play(a,b)},pause:function(){this.backend.isPaused()||this.backend.pause()},playPause:function(){this.backend.isPaused()?this.play():this.pause()},isPlaying:function(){return!this.backend.isPaused()},skipBackward:function(a){this.skip(-a||-this.params.skipLength)},skipForward:function(a){this.skip(a||this.params.skipLength)},skip:function(a){var b=this.getCurrentTime()||0,c=this.getDuration()||1;b=Math.max(0,Math.min(c,b+(a||0))),this.seekAndCenter(b/c)},seekAndCenter:function(a){this.seekTo(a),this.drawer.recenter(a)},seekTo:function(a){this.fireEvent("interaction",this.seekTo.bind(this,a));var b=this.backend.isPaused();b||this.backend.pause();var c=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(a*this.getDuration()),this.drawer.progress(this.backend.getPlayedPercents()),b||this.backend.play(),this.params.scrollParent=c,this.fireEvent("seek",a)},stop:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)},setVolume:function(a){this.backend.setVolume(a)},getVolume:function(){return this.backend.getVolume()},setPlaybackRate:function(a){this.backend.setPlaybackRate(a)},getPlaybackRate:function(){return this.backend.getPlaybackRate()},toggleMute:function(){this.setMute(!this.isMuted)},setMute:function(a){a!==this.isMuted&&(a?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0):(this.backend.setVolume(this.savedVolume),this.isMuted=!1))},getMute:function(){return this.isMuted},getFilters:function(){return this.backend.filters||[]},toggleScroll:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()},toggleInteraction:function(){this.params.interact=!this.params.interact},drawBuffer:function(){var a=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),b=this.drawer.getWidth(),c=a,d=this.drawer.getScrollX(),e=Math.min(d+b,c);if(this.params.fillParent&&(!this.params.scrollParent||ab&&(b=a[c]);return b},getId:function(){return"wavesurfer_"+Math.random().toString(32).substring(2)},ajax:function(b){var c=Object.create(a.Observer),d=new XMLHttpRequest,e=!1;return d.open(b.method||"GET",b.url,!0),d.responseType=b.responseType||"json",d.addEventListener("progress",function(a){c.fireEvent("progress",a),a.lengthComputable&&a.loaded==a.total&&(e=!0)}),d.addEventListener("load",function(a){e||c.fireEvent("progress",a),c.fireEvent("load",a),200==d.status||206==d.status?c.fireEvent("success",d.response,a):c.fireEvent("error",a)}),d.addEventListener("error",function(a){c.fireEvent("error",a)}),d.send(),c.xhr=d,c}},a.Observer={on:function(a,b){this.handlers||(this.handlers={});var c=this.handlers[a];return c||(c=this.handlers[a]=[]),c.push(b),{name:a,callback:b,un:this.un.bind(this,a,b)}},un:function(a,b){if(this.handlers){var c=this.handlers[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]==b&&c.splice(d,1);else c.length=0}},unAll:function(){this.handlers=null},once:function(a,b){var c=this,d=function(){b.apply(this,arguments),setTimeout(function(){c.un(a,d)},0)};return this.on(a,d)},fireEvent:function(a){if(this.handlers){var b=this.handlers[a],c=Array.prototype.slice.call(arguments,1);b&&b.forEach(function(a){a.apply(null,c)})}}},a.util.extend(a,a.Observer),a.WebAudio={scriptBufferSize:256,PLAYING_STATE:0,PAUSED_STATE:1,FINISHED_STATE:2,supportsWebAudio:function(){return!(!window.AudioContext&&!window.webkitAudioContext)},getAudioContext:function(){return this.ac||(this.ac=new(window.AudioContext||window.webkitAudioContext)),this.ac},getOfflineAudioContext:function(b){return a.WebAudio.offlineAudioContext||(a.WebAudio.offlineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,b)),a.WebAudio.offlineAudioContext},init:function(b){this.params=b,this.ac=b.audioContext||this.getAudioContext(),this.lastPlay=this.ac.currentTime,this.startPosition=0,this.scheduledPause=null,this.states=[Object.create(a.WebAudio.state.playing),Object.create(a.WebAudio.state.paused),Object.create(a.WebAudio.state.finished)],this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setState(this.PAUSED_STATE),this.setPlaybackRate(this.params.audioRate),this.setLength(0)},disconnectFilters:function(){this.filters&&(this.filters.forEach(function(a){a&&a.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))},setState:function(a){this.state!==this.states[a]&&(this.state=this.states[a],this.state.init.call(this))},setFilter:function(){this.setFilters([].slice.call(arguments))},setFilters:function(a){this.disconnectFilters(),a&&a.length&&(this.filters=a,this.analyser.disconnect(),a.reduce(function(a,b){return a.connect(b),b},this.analyser).connect(this.gainNode))},createScriptNode:function(){this.ac.createScriptProcessor?this.scriptNode=this.ac.createScriptProcessor(this.scriptBufferSize):this.scriptNode=this.ac.createJavaScriptNode(this.scriptBufferSize),this.scriptNode.connect(this.ac.destination)},addOnAudioProcess:function(){var a=this;this.scriptNode.onaudioprocess=function(){var b=a.getCurrentTime();b>=a.getDuration()?(a.setState(a.FINISHED_STATE),a.fireEvent("pause")):b>=a.scheduledPause?a.pause():a.state===a.states[a.PLAYING_STATE]&&a.fireEvent("audioprocess",b)}},removeOnAudioProcess:function(){this.scriptNode.onaudioprocess=null},createAnalyserNode:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)},createVolumeNode:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)},setVolume:function(a){this.gainNode.gain.value=a},getVolume:function(){return this.gainNode.gain.value},decodeArrayBuffer:function(a,b,c){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac?this.ac.sampleRate:44100)),this.offlineAc.decodeAudioData(a,function(a){b(a)}.bind(this),c)},setPeaks:function(a){this.peaks=a},setLength:function(a){if(!this.mergedPeaks||a!=2*this.mergedPeaks.length-1+2){this.splitPeaks=[],this.mergedPeaks=[];for(var b=this.buffer?this.buffer.numberOfChannels:1,c=0;cn&&(n=p),pthis.mergedPeaks[2*j])&&(this.mergedPeaks[2*j]=n),(0==g||m=this.getDuration()&&(a=0)),null==b&&(b=this.getDuration()),this.startPosition=a,this.lastPlay=this.ac.currentTime,this.state===this.states[this.FINISHED_STATE]&&this.setState(this.PAUSED_STATE),{start:a,end:b}},getPlayedTime:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate},play:function(a,b){if(this.buffer){this.createSource();var c=this.seekTo(a,b);a=c.start,b=c.end,this.scheduledPause=b,this.source.start(0,a,b-a),"suspended"==this.ac.state&&this.ac.resume&&this.ac.resume(),this.setState(this.PLAYING_STATE),this.fireEvent("play")}},pause:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime(),this.source&&this.source.stop(0),this.setState(this.PAUSED_STATE),this.fireEvent("pause")},getCurrentTime:function(){return this.state.getCurrentTime.call(this)},getPlaybackRate:function(){return this.playbackRate},setPlaybackRate:function(a){a=a||1,this.isPaused()?this.playbackRate=a:(this.pause(),this.playbackRate=a,this.play())}},a.WebAudio.state={},a.WebAudio.state.playing={init:function(){this.addOnAudioProcess()},getPlayedPercents:function(){var a=this.getDuration();return this.getCurrentTime()/a||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}},a.WebAudio.state.paused={init:function(){this.removeOnAudioProcess()},getPlayedPercents:function(){var a=this.getDuration();return this.getCurrentTime()/a||0},getCurrentTime:function(){return this.startPosition}},a.WebAudio.state.finished={init:function(){this.removeOnAudioProcess(),this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}},a.util.extend(a.WebAudio,a.Observer),a.MediaElement=Object.create(a.WebAudio),a.util.extend(a.MediaElement,{init:function(a){this.params=a,this.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){}},this.mediaType=a.mediaType.toLowerCase(),this.elementPosition=a.elementPosition,this.setPlaybackRate(this.params.audioRate),this.createTimer()},createTimer:function(){var a=this,b=function(){if(!a.isPaused()){a.fireEvent("audioprocess",a.getCurrentTime());var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame;c(b)}};this.on("play",b)},load:function(a,b,c,d){var e=document.createElement(this.mediaType);e.controls=this.params.mediaControls,e.autoplay=this.params.autoplay||!1,e.preload=null==d?"auto":d,e.src=a,e.style.width="100%";var f=b.querySelector(this.mediaType);f&&b.removeChild(f),b.appendChild(e),this._load(e,c)},loadElt:function(a,b){var c=a;c.controls=this.params.mediaControls,c.autoplay=this.params.autoplay||!1,this._load(c,b)},_load:function(a,b){var c=this;"function"==typeof a.load&&a.load(),a.addEventListener("error",function(){c.fireEvent("error","Error loading media element")}),a.addEventListener("canplay",function(){c.fireEvent("canplay")}),a.addEventListener("ended",function(){c.fireEvent("finish")}),this.media=a,this.peaks=b,this.onPlayEnd=null,this.buffer=null,this.setPlaybackRate(this.playbackRate)},isPaused:function(){return!this.media||this.media.paused},getDuration:function(){var a=(this.buffer||this.media).duration;return a>=1/0&&(a=this.media.seekable.end(0)),a},getCurrentTime:function(){return this.media&&this.media.currentTime},getPlayedPercents:function(){return this.getCurrentTime()/this.getDuration()||0},setPlaybackRate:function(a){this.playbackRate=a||1,this.media.playbackRate=this.playbackRate},seekTo:function(a){null!=a&&(this.media.currentTime=a),this.clearPlayEnd()},play:function(a,b){this.seekTo(a),this.media.play(),b&&this.setPlayEnd(b),this.fireEvent("play")},pause:function(){this.media&&this.media.pause(),this.clearPlayEnd(),this.fireEvent("pause")},setPlayEnd:function(a){var b=this;this.onPlayEnd=function(c){c>=a&&(b.pause(),b.seekTo(a))},this.on("audioprocess",this.onPlayEnd)},clearPlayEnd:function(){this.onPlayEnd&&(this.un("audioprocess",this.onPlayEnd),this.onPlayEnd=null)},getPeaks:function(b,c,d){return this.buffer?a.WebAudio.getPeaks.call(this,b,c,d):this.peaks||[]},getVolume:function(){return this.media.volume},setVolume:function(a){this.media.volume=a},destroy:function(){this.pause(),this.unAll(),this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}),a.AudioElement=a.MediaElement,a.Drawer={init:function(a,b){this.container=a,this.params=b,this.width=0,this.height=b.height*this.params.pixelRatio,this.lastPos=0,this.initDrawer(b),this.createWrapper(),this.createElements()},createWrapper:function(){this.wrapper=this.container.appendChild(document.createElement("wave")),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()},handleEvent:function(a,b){!b&&a.preventDefault();var c,d=a.targetTouches?a.targetTouches[0].clientX:a.clientX,e=this.wrapper.getBoundingClientRect(),f=this.width,g=this.getWidth();return!this.params.fillParent&&f1&&(c=1)):c=(d-e.left+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0,c},setupWrapperEvents:function(){var a=this;this.wrapper.addEventListener("click",function(b){var c=a.wrapper.offsetHeight-a.wrapper.clientHeight;if(0!=c){var d=a.wrapper.getBoundingClientRect();if(b.clientY>=d.bottom-c)return}a.params.interact&&a.fireEvent("click",b,a.handleEvent(b))}),this.wrapper.addEventListener("scroll",function(b){a.fireEvent("scroll",b)})},drawPeaks:function(a,b,c,d){this.setWidth(b),this.params.barWidth?this.drawBars(a,0,c,d):this.drawWave(a,0,c,d)},style:function(a,b){return Object.keys(b).forEach(function(c){a.style[c]!==b[c]&&(a.style[c]=b[c])}),a},resetScroll:function(){null!==this.wrapper&&(this.wrapper.scrollLeft=0)},recenter:function(a){var b=this.wrapper.scrollWidth*a;this.recenterOnPosition(b,!0)},recenterOnPosition:function(a,b){var c=this.wrapper.scrollLeft,d=~~(this.wrapper.clientWidth/2),e=a-d,f=e-c,g=this.wrapper.scrollWidth-this.wrapper.clientWidth;if(0!=g){if(!b&&-d<=f&&f=b){if(this.lastPos=c,this.params.scrollParent&&this.params.autoCenter){var d=~~(this.wrapper.scrollWidth*a);this.recenterOnPosition(d)}this.updateProgress(c)}},destroy:function(){this.unAll(),this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=null)},initDrawer:function(){},createElements:function(){},updateSize:function(){},drawWave:function(a,b){},clearWave:function(){},updateProgress:function(a){}},a.util.extend(a.Drawer,a.Observer),a.Drawer.Canvas=Object.create(a.Drawer),a.util.extend(a.Drawer.Canvas,{createElements:function(){var a=this.wrapper.appendChild(this.style(document.createElement("canvas"),{position:"absolute",zIndex:1,left:0,top:0,bottom:0}));if(this.waveCc=a.getContext("2d"),this.progressWave=this.wrapper.appendChild(this.style(document.createElement("wave"),{position:"absolute",zIndex:2,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})),this.params.waveColor!=this.params.progressColor){var b=this.progressWave.appendChild(document.createElement("canvas"));this.progressCc=b.getContext("2d")}},updateSize:function(){var a=Math.round(this.width/this.params.pixelRatio);this.waveCc.canvas.width=this.width,this.waveCc.canvas.height=this.height,this.style(this.waveCc.canvas,{width:a+"px"}),this.style(this.progressWave,{display:"block"}),this.progressCc&&(this.progressCc.canvas.width=this.width,this.progressCc.canvas.height=this.height,this.style(this.progressCc.canvas,{width:a+"px"})),this.clearWave()},clearWave:function(){this.waveCc.clearRect(0,0,this.width,this.height),this.progressCc&&this.progressCc.clearRect(0,0,this.width,this.height)},drawBars:function(b,c,d,e){var f=this;if(b[0]instanceof Array){var g=b;if(this.params.splitChannels)return this.setHeight(g.length*this.params.height*this.params.pixelRatio),void g.forEach(function(a,b){f.drawBars(a,b,d,e)});b=g[0]}var h=[].some.call(b,function(a){return a<0}),i=1;h&&(i=2);var j=.5/this.params.pixelRatio,k=this.width,l=this.params.height*this.params.pixelRatio,m=l*c||0,n=l/2,o=b.length/i,p=this.params.barWidth*this.params.pixelRatio,q=Math.max(this.params.pixelRatio,~~(p/2)),r=p+q,s=1;if(this.params.normalize){var t=a.util.max(b),u=a.util.min(b);s=-u>t?-u:t}var v=o/k;this.waveCc.fillStyle=this.params.waveColor,this.progressCc&&(this.progressCc.fillStyle=this.params.progressColor),[this.waveCc,this.progressCc].forEach(function(a){if(a)for(var c=d/v;cs?-t:s}this.waveCc.fillStyle=this.params.waveColor,this.progressCc&&(this.progressCc.fillStyle=this.params.progressColor),[this.waveCc,this.progressCc].forEach(function(a){if(a){a.beginPath(),a.moveTo(d*q+l,o+n);for(var c=d;c=d;c--){var f=Math.round(b[2*c+1]/r*o);a.lineTo(c*q+l,o-f+n)}a.closePath(),a.fill(),a.fillRect(0,o+n-l,this.width,l)}},this)},updateProgress:function(a){this.style(this.progressWave,{width:a+"px"})},getImage:function(a,b){return this.waveCc.canvas.toDataURL(a,b)}}),a.Drawer.MultiCanvas=Object.create(a.Drawer),a.util.extend(a.Drawer.MultiCanvas,{initDrawer:function(a){if(this.maxCanvasWidth=null!=a.maxCanvasWidth?a.maxCanvasWidth:4e3,this.maxCanvasElementWidth=Math.round(this.maxCanvasWidth/this.params.pixelRatio),this.maxCanvasWidth<=1)throw"maxCanvasWidth must be greater than 1.";if(this.maxCanvasWidth%2==1)throw"maxCanvasWidth must be an even number.";this.hasProgressCanvas=this.params.waveColor!=this.params.progressColor,this.halfPixel=.5/this.params.pixelRatio,this.canvases=[]},createElements:function(){this.progressWave=this.wrapper.appendChild(this.style(document.createElement("wave"),{position:"absolute",zIndex:2,left:0,top:0,bottom:0,overflow:"hidden",width:"0",display:"none",boxSizing:"border-box",borderRightStyle:"solid",borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})),this.addCanvas()},updateSize:function(){for(var a=Math.round(this.width/this.params.pixelRatio),b=Math.ceil(a/this.maxCanvasElementWidth);this.canvases.lengthb;)this.removeCanvas();for(var c in this.canvases){var d=this.maxCanvasWidth+2*Math.ceil(this.params.pixelRatio/2);c==this.canvases.length-1&&(d=this.width-this.maxCanvasWidth*(this.canvases.length-1)),this.updateDimensions(this.canvases[c],d,this.height),this.clearWaveForEntry(this.canvases[c])}},addCanvas:function(){var a={},b=this.maxCanvasElementWidth*this.canvases.length;a.wave=this.wrapper.appendChild(this.style(document.createElement("canvas"),{position:"absolute",zIndex:1,left:b+"px",top:0,bottom:0})),a.waveCtx=a.wave.getContext("2d"),this.hasProgressCanvas&&(a.progress=this.progressWave.appendChild(this.style(document.createElement("canvas"),{position:"absolute",left:b+"px",top:0,bottom:0})),a.progressCtx=a.progress.getContext("2d")),this.canvases.push(a)},removeCanvas:function(){var a=this.canvases.pop();a.wave.parentElement.removeChild(a.wave),this.hasProgressCanvas&&a.progress.parentElement.removeChild(a.progress)},updateDimensions:function(a,b,c){var d=Math.round(b/this.params.pixelRatio),e=Math.round(this.width/this.params.pixelRatio);a.start=a.waveCtx.canvas.offsetLeft/e||0,a.end=a.start+d/e,a.waveCtx.canvas.width=b,a.waveCtx.canvas.height=c,this.style(a.waveCtx.canvas,{width:d+"px"}),this.style(this.progressWave,{display:"block"}),this.hasProgressCanvas&&(a.progressCtx.canvas.width=b,a.progressCtx.canvas.height=c,this.style(a.progressCtx.canvas,{width:d+"px"}))},clearWave:function(){for(var a in this.canvases)this.clearWaveForEntry(this.canvases[a])},clearWaveForEntry:function(a){a.waveCtx.clearRect(0,0,a.waveCtx.canvas.width,a.waveCtx.canvas.height),this.hasProgressCanvas&&a.progressCtx.clearRect(0,0,a.progressCtx.canvas.width,a.progressCtx.canvas.height)},drawBars:function(b,c,d,e){var f=this;if(b[0]instanceof Array){var g=b;if(this.params.splitChannels)return this.setHeight(g.length*this.params.height*this.params.pixelRatio),void g.forEach(function(a,b){f.drawBars(a,b,d,e)});b=g[0]}var h=[].some.call(b,function(a){return a<0}),i=1;h&&(i=2);var j=this.width,k=this.params.height*this.params.pixelRatio,l=k*c||0,m=k/2,n=b.length/i,o=this.params.barWidth*this.params.pixelRatio,p=Math.max(this.params.pixelRatio,~~(o/2)),q=o+p,r=1;if(this.params.normalize){var s=a.util.max(b),t=a.util.min(b);r=-t>s?-t:s}for(var u=n/j,v=d/u;vp?-q:p}this.drawLine(b,o,n,m,d,e),this.fillRect(0,n+m-this.halfPixel,this.width,this.halfPixel)},drawLine:function(a,b,c,d,e,f){for(var g in this.canvases){var h=this.canvases[g];this.setFillStyles(h),this.drawLineToContext(h,h.waveCtx,a,b,c,d,e,f),this.drawLineToContext(h,h.progressCtx,a,b,c,d,e,f)}},drawLineToContext:function(a,b,c,d,e,f,g,h){if(b){var i=c.length/2,j=1;this.params.fillParent&&this.width!=i&&(j=this.width/i);var k=Math.round(i*a.start),l=Math.round(i*a.end);if(!(k>h||l=m;o--){var p=c[2*o+1]||0,q=Math.round(p/d*e);b.lineTo((o-k)*j+this.halfPixel,e-q+f)}b.closePath(),b.fill()}}},fillRect:function(a,b,c,d){for(var e=Math.floor(a/this.maxCanvasWidth),f=Math.min(Math.ceil((a+c)/this.maxCanvasWidth)+1,this.canvases.length),g=e;g{return e={427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(138)),i=a(r(56));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var r=0;r=h;m--)u=t[2*m+1]||0,l=Math.round(u/y),e.lineTo((m-f)*p+this.halfPixel,v-l);e.lineTo((h-f)*p,v-Math.round((t[2*h+1]||0)/y)),e.closePath(),e.fill()}}},{key:"destroy",value:function(){this.waveCtx=null,this.wave=null,this.progressCtx=null,this.progress=null}},{key:"getImage",value:function(e,t,r){var n=this;return"blob"===r?new Promise((function(r){n.wave.toBlob(r,e,t)})):"dataURL"===r?this.wave.toDataURL(e,t):void 0}}])&&s(t.prototype,r),a&&s(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u,e.exports=t.default},276:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=o?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(i,s,u):i[s]=e[s]}return i.default=e,r&&r.set(e,i),i}(r(241));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function o(e,t){for(var r=0;r=a.bottom-n)return}e.params.interact&&e.fireEvent("click",t,e.handleEvent(t))})),this.wrapper.addEventListener("dblclick",(function(t){e.params.interact&&e.fireEvent("dblclick",t,e.handleEvent(t))})),this.wrapper.addEventListener("scroll",(function(t){return e.fireEvent("scroll",t)}))}},{key:"drawPeaks",value:function(e,t,r,n){this.setWidth(t)||this.clearWave(),this.params.barWidth?this.drawBars(e,0,r,n):this.drawWave(e,0,r,n)}},{key:"resetScroll",value:function(){null!==this.wrapper&&(this.wrapper.scrollLeft=0)}},{key:"recenter",value:function(e){var t=this.wrapper.scrollWidth*e;this.recenterOnPosition(t,!0)}},{key:"recenterOnPosition",value:function(e,t){var r=this.wrapper.scrollLeft,n=~~(this.wrapper.clientWidth/2),i=this.wrapper.scrollWidth-this.wrapper.clientWidth,a=e-n,o=a-r;if(0!=i){if(!t&&-n<=o&&o=t){if(this.lastPos=r,this.params.scrollParent&&this.params.autoCenter){var n=~~(this.wrapper.scrollWidth*e);this.recenterOnPosition(n,this.params.autoCenterImmediately)}this.updateProgress(r)}}},{key:"destroy",value:function(){this.unAll(),this.wrapper&&(this.wrapper.parentNode==this.container.domElement&&this.container.removeChild(this.wrapper.domElement),this.wrapper=null)}},{key:"updateCursor",value:function(){}},{key:"updateSize",value:function(){}},{key:"drawBars",value:function(e,t,r,n){}},{key:"drawWave",value:function(e,t,r,n){}},{key:"clearWave",value:function(){}},{key:"updateProgress",value:function(e){}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Observer);t.default=c,e.exports=t.default},646:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=u(r(276)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=a?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(i,o,u):i[o]=e[o]}return i.default=e,r&&r.set(e,i),i}(r(241)),o=u(r(427));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;rr;)this.removeCanvas();var n=this.maxCanvasWidth+this.overlap,i=this.canvases.length-1;this.canvases.forEach((function(t,r){r==i&&(n=e.width-e.maxCanvasWidth*i),e.updateDimensions(t,n,e.height),t.clearWave()}))}},{key:"addCanvas",value:function(){var e=new this.EntryClass;e.canvasContextAttributes=this.canvasContextAttributes,e.hasProgressCanvas=this.hasProgressCanvas,e.halfPixel=this.halfPixel;var t=this.maxCanvasElementWidth*this.canvases.length,r=a.withOrientation(this.wrapper.appendChild(document.createElement("canvas")),this.params.vertical);if(this.style(r,{position:"absolute",zIndex:2,left:t+"px",top:0,bottom:0,height:"100%",pointerEvents:"none"}),e.initWave(r),this.hasProgressCanvas){var n=a.withOrientation(this.progressWave.appendChild(document.createElement("canvas")),this.params.vertical);this.style(n,{position:"absolute",left:t+"px",top:0,bottom:0,height:"100%"}),e.initProgress(n)}this.canvases.push(e)}},{key:"removeCanvas",value:function(){var e=this.canvases[this.canvases.length-1];e.wave.parentElement.removeChild(e.wave.domElement),this.hasProgressCanvas&&e.progress.parentElement.removeChild(e.progress.domElement),e&&(e.destroy(),e=null),this.canvases.pop()}},{key:"updateDimensions",value:function(e,t,r){var n=Math.round(t/this.params.pixelRatio),i=Math.round(this.width/this.params.pixelRatio);e.updateDimensions(n,i,t,r),this.style(this.progressWave,{display:"block"})}},{key:"clearWave",value:function(){var e=this;a.frame((function(){e.canvases.forEach((function(e){return e.clearWave()}))}))()}},{key:"drawBars",value:function(e,t,r,n){var i=this;return this.prepareDraw(e,t,r,n,(function(e){var t=e.absmax,a=e.hasMinVals,o=(e.height,e.offsetY),s=e.halfH,u=e.peaks,l=e.channelIndex;if(void 0!==r)for(var c=a?2:1,f=u.length/c,h=i.params.barWidth*i.params.pixelRatio,d=h+(null===i.params.barGap?Math.max(i.params.pixelRatio,~~(h/2)):Math.max(i.params.pixelRatio,i.params.barGap*i.params.pixelRatio)),p=f/i.width,v=n,y=r;ym&&(m=A),b+=c}while(b1&&void 0!==arguments[1]?arguments[1]:this.params.waveColor,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.params.progressColor;e.setFillStyles(t,r)}},{key:"applyCanvasTransforms",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.applyCanvasTransforms(t)}},{key:"getImage",value:function(e,t,r){if("blob"===r)return Promise.all(this.canvases.map((function(n){return n.getImage(e,t,r)})));if("dataURL"===r){var n=this.canvases.map((function(n){return n.getImage(e,t,r)}));return n.length>1?n:n[0]}}},{key:"updateProgress",value:function(e){this.style(this.progressWave,{width:e+"px"})}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.default);t.default=d,e.exports=t.default},328:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i;function a(e,t){for(var r=0;r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=r(379))&&i.__esModule?i:{default:i},o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=a?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(i,o,u):i[o]=e[o]}return i.default=e,r&&r.set(e,i),i}(r(241));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e,t){for(var r=0;r=1/0&&(e=this.media.seekable.end(0)),e}},{key:"getCurrentTime",value:function(){return this.media&&this.media.currentTime}},{key:"getPlayedPercents",value:function(){return this.getCurrentTime()/this.getDuration()||0}},{key:"getPlaybackRate",value:function(){return this.playbackRate||this.media.playbackRate}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e||1,this.media.playbackRate=this.playbackRate}},{key:"seekTo",value:function(e){null==e||isNaN(e)||(this.media.currentTime=e),this.clearPlayEnd()}},{key:"play",value:function(e,t){this.seekTo(e);var r=this.media.play();return t&&this.setPlayEnd(t),r}},{key:"pause",value:function(){var e;return this.media&&(e=this.media.pause()),this.clearPlayEnd(),e}},{key:"setPlayEnd",value:function(e){var t=this;this.clearPlayEnd(),this._onPlayEnd=function(r){r>=e&&(t.pause(),t.seekTo(e))},this.on("audioprocess",this._onPlayEnd)}},{key:"clearPlayEnd",value:function(){this._onPlayEnd&&(this.un("audioprocess",this._onPlayEnd),this._onPlayEnd=null)}},{key:"getPeaks",value:function(e,t,r){return this.buffer?l(h(a.prototype),"getPeaks",this).call(this,e,t,r):this.peaks||[]}},{key:"setSinkId",value:function(e){return e?this.media.setSinkId?this.media.setSinkId(e):Promise.reject(new Error("setSinkId is not supported in your browser")):Promise.reject(new Error("Invalid deviceId: "+e))}},{key:"getVolume",value:function(){return this.volume}},{key:"setVolume",value:function(e){this.volume=e,this.media.volume!==this.volume&&(this.media.volume=this.volume)}},{key:"setMute",value:function(e){this.isMuted=this.media.muted=e}},{key:"destroy",value:function(){var e=this;this.pause(),this.unAll(),this.destroyed=!0,Object.keys(this.mediaListeners).forEach((function(t){e.media&&e.media.removeEventListener(t,e.mediaListeners[t])})),this.params.removeMediaElementOnDestroy&&this.media&&this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}])&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(a.default);t.default=d,e.exports=t.default},227:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,n.default)(e),r=(0,i.default)(e);return-r>t?-r:t};var n=a(r(178)),i=a(r(706));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},694:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return Math.min(Math.max(t,e),r)},e.exports=t.default},342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)throw new Error("fetch options missing");if(!e.url)throw new Error("fetch url missing");var t=new i.default,r=new Headers,n=new Request(e.url);t.controller=new AbortController,e&&e.requestHeaders&&e.requestHeaders.forEach((function(e){r.append(e.key,e.value)}));var a=e.responseType||"json",o={method:e.method||"GET",headers:r,mode:e.mode||"cors",credentials:e.credentials||"same-origin",cache:e.cache||"default",redirect:e.redirect||"follow",referrer:e.referrer||"client",signal:t.controller.signal};return fetch(n,o).then((function(e){t.response=e;var r=!0;e.body||(r=!1);var n=e.headers.get("content-length");return null===n&&(r=!1),r?(t.onProgress=function(e){t.fireEvent("progress",e)},new Response(new ReadableStream(new s(t,n,e)),o)):e})).then((function(e){var t;if(e.ok)switch(a){case"arraybuffer":return e.arrayBuffer();case"json":return e.json();case"blob":return e.blob();case"text":return e.text();default:t="Unknown responseType: "+a}throw t||(t="HTTP error status: "+e.status),new Error(t)})).then((function(e){t.fireEvent("success",e)})).catch((function(e){t.fireEvent("error",e)})),t.fetchRequest=n,t};var n,i=(n=r(399))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e="wavesurfer_"),e+Math.random().toString(32).substring(2)},e.exports=t.default},241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"absMax",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"clamp",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"fetchFile",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"frame",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"getId",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"ignoreSilenceMode",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"max",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"min",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"preventClick",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"requestAnimationFrame",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"style",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"withOrientation",{enumerable:!0,get:function(){return v.default}});var n=m(r(56)),i=m(r(178)),a=m(r(706)),o=m(r(765)),s=m(r(399)),u=m(r(138)),l=m(r(779)),c=m(r(412)),f=m(r(296)),h=m(r(529)),d=m(r(342)),p=m(r(694)),v=m(r(713)),y=m(r(457));function m(e){return e&&e.__esModule?e:{default:e}}},178:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=-1/0;return Object.keys(e).forEach((function(r){e[r]>t&&(t=e[r])})),t},e.exports=t.default},706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=Number(1/0);return Object.keys(e).forEach((function(r){e[r]{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;n=0;r--)n[r]==t&&n.splice(r,1);else n.length=0}}},{key:"unAll",value:function(){this.handlers=null}},{key:"once",value:function(e,t){var r=this;return this.on(e,(function n(){for(var i=arguments.length,a=new Array(i),o=0;o1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){return t[i]?t:new Proxy(t,{get:function(t,a,o){if(a===i)return!0;if("domElement"===a)return t;if("style"===a)return e(t.style,r);if("canvas"===a)return e(t.canvas,r);if("getBoundingClientRect"===a)return function(){return e(t.getBoundingClientRect.apply(t,arguments),r)};if("getContext"===a)return function(){return e(t.getContext.apply(t,arguments),r)};var s=t[n(a,r)];return"function"==typeof s?s.bind(t):s},set:function(e,t,i){return e[n(t,r)]=i,!0}})};var r={width:"height",height:"width",overflowX:"overflowY",overflowY:"overflowX",clientWidth:"clientHeight",clientHeight:"clientWidth",clientX:"clientY",clientY:"clientX",scrollWidth:"scrollHeight",scrollLeft:"scrollTop",offsetLeft:"offsetTop",offsetTop:"offsetLeft",offsetHeight:"offsetWidth",offsetWidth:"offsetHeight",left:"top",right:"bottom",top:"left",bottom:"right",borderRightStyle:"borderBottomStyle",borderRightWidth:"borderBottomWidth",borderRightColor:"borderBottomColor"};function n(e,t){return Object.prototype.hasOwnProperty.call(r,e)&&t?r[e]:e}var i=Symbol("isProxy");e.exports=t.default},529:(e,t)=>{"use strict";function r(e){e.stopPropagation(),document.body.removeEventListener("click",r,!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){document.body.addEventListener("click",r,!0)},e.exports=t.default},779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){return setTimeout(e,1e3/60)}).bind(window);t.default=r,e.exports=t.default},457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=new AudioContext,t=e.createBufferSource();t.buffer=e.createBuffer(1,1,44100),t.connect(e.destination),t.start();var r=document.createElement("div");r.innerHTML='';var n=r.children.item(0);n.src="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",n.preload="auto",n.type="audio/mpeg",n.disableRemotePlayback=!0,n.play(),n.remove(),r.remove()},e.exports=t.default},138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.keys(t).forEach((function(r){e.style[r]!==t[r]&&(e.style[r]=t[r])})),e},e.exports=t.default},631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==m(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r(241)),i=l(r(646)),a=l(r(379)),o=l(r(743)),s=l(r(227)),u=l(r(328));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,r){return(t=k(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r=this.getDuration()?this.seekTo(1):this.seekTo(e/this.getDuration())}},{key:"play",value:function(e,t){var r=this;return this.params.ignoreSilenceMode&&n.ignoreSilenceMode(),this.fireEvent("interaction",(function(){return r.play(e,t)})),this.backend.play(e,t)}},{key:"setPlayEnd",value:function(e){this.backend.setPlayEnd(e)}},{key:"pause",value:function(){if(!this.backend.isPaused())return this.backend.pause()}},{key:"playPause",value:function(){return this.backend.isPaused()?this.play():this.pause()}},{key:"isPlaying",value:function(){return!this.backend.isPaused()}},{key:"skipBackward",value:function(e){this.skip(-e||-this.params.skipLength)}},{key:"skipForward",value:function(e){this.skip(e||this.params.skipLength)}},{key:"skip",value:function(e){var t=this.getDuration()||1,r=this.getCurrentTime()||0;r=Math.max(0,Math.min(t,r+(e||0))),this.seekAndCenter(r/t)}},{key:"seekAndCenter",value:function(e){this.seekTo(e),this.drawer.recenter(e)}},{key:"seekTo",value:function(e){var t=this;if("number"!=typeof e||!isFinite(e)||e<0||e>1)throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");this.fireEvent("interaction",(function(){return t.seekTo(e)}));var r="WebAudio"===this.params.backend,n=this.backend.isPaused();r&&!n&&this.backend.pause();var i=this.params.scrollParent;this.params.scrollParent=!1,this.backend.seekTo(e*this.getDuration()),this.drawer.progress(e),r&&!n&&this.backend.play(),this.params.scrollParent=i,this.fireEvent("seek",e)}},{key:"stop",value:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)}},{key:"setSinkId",value:function(e){return this.backend.setSinkId(e)}},{key:"setVolume",value:function(e){!0!==this.isMuted?(this.backend.setVolume(e),this.fireEvent("volume",e)):this.savedVolume=e}},{key:"getVolume",value:function(){return this.backend.getVolume()}},{key:"setPlaybackRate",value:function(e){this.backend.setPlaybackRate(e)}},{key:"getPlaybackRate",value:function(){return this.backend.getPlaybackRate()}},{key:"toggleMute",value:function(){this.setMute(!this.isMuted)}},{key:"setMute",value:function(e){e!==this.isMuted?(this.backend.setMute?(this.backend.setMute(e),this.isMuted=e):e?(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0,this.fireEvent("volume",0)):(this.backend.setVolume(this.savedVolume),this.isMuted=!1,this.fireEvent("volume",this.savedVolume)),this.fireEvent("mute",this.isMuted)):this.fireEvent("mute",this.isMuted)}},{key:"getMute",value:function(){return this.isMuted}},{key:"getFilters",value:function(){return this.backend.filters||[]}},{key:"toggleScroll",value:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()}},{key:"toggleInteraction",value:function(){this.params.interact=!this.params.interact}},{key:"getWaveColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[e]?this.params.splitChannelsOptions.channelColors[e].waveColor:this.params.waveColor}},{key:"setWaveColor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.params.splitChannelsOptions.channelColors[t]?this.params.splitChannelsOptions.channelColors[t].waveColor=e:this.params.waveColor=e,this.drawBuffer()}},{key:"getProgressColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.params.splitChannelsOptions.channelColors[e]?this.params.splitChannelsOptions.channelColors[e].progressColor:this.params.progressColor}},{key:"setProgressColor",value:function(e,t){this.params.splitChannelsOptions.channelColors[t]?this.params.splitChannelsOptions.channelColors[t].progressColor=e:this.params.progressColor=e,this.drawBuffer()}},{key:"getBackgroundColor",value:function(){return this.params.backgroundColor}},{key:"setBackgroundColor",value:function(e){this.params.backgroundColor=e,n.style(this.container,{background:this.params.backgroundColor})}},{key:"getCursorColor",value:function(){return this.params.cursorColor}},{key:"setCursorColor",value:function(e){this.params.cursorColor=e,this.drawer.updateCursor()}},{key:"getHeight",value:function(){return this.params.height}},{key:"setHeight",value:function(e){this.params.height=e,this.drawer.setHeight(e*this.params.pixelRatio),this.drawBuffer()}},{key:"setFilteredChannels",value:function(e){this.params.splitChannelsOptions.filterChannels=e,this.drawBuffer()}},{key:"drawBuffer",value:function(){var e,t=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),r=this.drawer.getWidth(),n=t,i=0,a=Math.max(i+r,n);if(this.params.fillParent&&(!this.params.scrollParent||t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=o?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(n,s,u):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}(r(241));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){for(var r=0;r=e.getDuration()&&e.state!==e.states[v]?(e.setState(v),e.fireEvent("pause")):r>=e.scheduledPause&&e.state!==e.states[p]?e.pause():e.state===e.states[d]&&(e.fireEvent("audioprocess",r),n.frame(t)())}()}},{key:"createAnalyserNode",value:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)}},{key:"createVolumeNode",value:function(){this.ac.createGain?this.gainNode=this.ac.createGain():this.gainNode=this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)}},{key:"setSinkId",value:function(e){return e?(this.sinkAudioElement||(this.sinkAudioElement=new window.Audio,this.sinkAudioElement.autoplay=!0),this.sinkAudioElement.setSinkId?(this.sinkStreamDestination||(this.sinkStreamDestination=this.ac.createMediaStreamDestination()),this.gainNode.disconnect(),this.gainNode.connect(this.sinkStreamDestination),this.sinkAudioElement.srcObject=this.sinkStreamDestination.stream,this.sinkAudioElement.setSinkId(e)):Promise.reject(new Error("setSinkId is not supported in your browser"))):Promise.reject(new Error("Invalid deviceId: "+e))}},{key:"setVolume",value:function(e){this.gainNode.gain.setValueAtTime(e,this.ac.currentTime)}},{key:"getVolume",value:function(){return this.gainNode.gain.value}},{key:"decodeArrayBuffer",value:function(e,t,r){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac&&this.ac.sampleRate?this.ac.sampleRate:44100)),"webkitAudioContext"in window?this.offlineAc.decodeAudioData(e,(function(e){return t(e)}),r):this.offlineAc.decodeAudioData(e).then((function(e){return t(e)})).catch((function(e){return r(e)}))}},{key:"setPeaks",value:function(e,t){null!=t&&(this.explicitDuration=t),this.peaks=e}},{key:"setLength",value:function(e){if(!this.mergedPeaks||e!=2*this.mergedPeaks.length-1+2){this.splitPeaks=[],this.mergedPeaks=[];var t,r=this.buffer?this.buffer.numberOfChannels:1;for(t=0;tp&&(p=y),ythis.mergedPeaks[2*c])&&(this.mergedPeaks[2*c]=p),(0==i||d=this.getDuration()&&(e=0),null==t&&(t=this.getDuration()),this.startPosition=e,this.lastPlay=this.ac.currentTime,this.state===this.states[v]&&this.setState(p),{start:e,end:t}}},{key:"getPlayedTime",value:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate}},{key:"play",value:function(e,t){if(this.buffer){this.createSource();var r=this.seekTo(e,t);e=r.start,t=r.end,this.scheduledPause=t,this.source.start(0,e),this.resumeAudioContext(),this.setState(d),this.fireEvent("play")}}},{key:"pause",value:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime();try{this.source&&this.source.stop(0)}catch(e){}this.setState(p),this.fireEvent("pause")}},{key:"getCurrentTime",value:function(){return this.state.getCurrentTime.call(this)}},{key:"getPlaybackRate",value:function(){return this.playbackRate}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e||1,this.source&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.ac.currentTime)}},{key:"setPlayEnd",value:function(e){this.scheduledPause=e}}],r&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Observer);t.default=y,e.exports=t.default},296:e=>{function t(e,t,r){var n,i,a,o,s;function u(){var l=Date.now()-o;l=0?n=setTimeout(u,t-l):(n=null,r||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var l=function(){a=this,i=arguments,o=Date.now();var l=r&&!n;return n||(n=setTimeout(u,t)),l&&(s=e.apply(a,i),a=i=null),s};return l.clear=function(){n&&(clearTimeout(n),n=null)},l.flush=function(){n&&(s=e.apply(a,i),a=i=null,clearTimeout(n),n=null)},l}t.debounce=t,e.exports=t}},t={},function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(631);var e,t})); +//# sourceMappingURL=wavesurfer.min.js.map From a82862a8fba38468279e8f2d6473bae6568c38e2 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Mon, 28 Aug 2023 18:08:29 +0200 Subject: [PATCH 2/2] Create wavesurfer.min.js.map Signed-off-by: Lorenzo Mangani --- web/js/wavesurfer.min.js.map | 1 + 1 file changed, 1 insertion(+) create mode 100644 web/js/wavesurfer.min.js.map diff --git a/web/js/wavesurfer.min.js.map b/web/js/wavesurfer.min.js.map new file mode 100644 index 0000000..8f689a9 --- /dev/null +++ b/web/js/wavesurfer.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wavesurfer.min.js","mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OAC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WACdL,EAAUxtB,KACV0d,EAAOvW,UACPsmB,EAAYE,KAAKC,MACjB,IAAIE,EAAUniB,IAAc4hB,EAO5B,OANKA,IAASA,EAAUtO,WAAWyO,EAAOJ,IACtCQ,IACF/mB,EAASyW,EAAKpW,MAAMomB,EAAS9P,GAC7B8P,EAAU9P,EAAO,MAGZ3W,CACT,EAmBA,OAjBA8mB,EAAUE,MAAQ,WACZR,IACFS,aAAaT,GACbA,EAAU,KAEd,EAEAM,EAAUI,MAAQ,WACZV,IACFxmB,EAASyW,EAAKpW,MAAMomB,EAAS9P,GAC7B8P,EAAU9P,EAAO,KAEjBsQ,aAAaT,GACbA,EAAU,KAEd,EAEOM,CACT,CAGA7J,EAASA,SAAWA,EAEpB5mB,EAAOD,QAAU6mB,C,GCpEbkK,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB/uB,IAAjBgvB,EACH,OAAOA,EAAalxB,QAGrB,IAAIC,EAAS8wB,EAAyBE,GAAY,CAGjDjxB,QAAS,CAAC,GAOX,OAHAmxB,EAAoBF,GAAUhxB,EAAQA,EAAOD,QAASgxB,GAG/C/wB,EAAOD,OACf,CCnB0BgxB,CAAoB,KzBO9C,I,EwBTID,C","sources":["webpack://WaveSurfer/webpack/universalModuleDefinition","webpack://WaveSurfer/./src/drawer.canvasentry.js","webpack://WaveSurfer/./src/drawer.js","webpack://WaveSurfer/./src/drawer.multicanvas.js","webpack://WaveSurfer/./src/mediaelement-webaudio.js","webpack://WaveSurfer/./src/mediaelement.js","webpack://WaveSurfer/./src/peakcache.js","webpack://WaveSurfer/./src/util/absMax.js","webpack://WaveSurfer/./src/util/clamp.js","webpack://WaveSurfer/./src/util/fetch.js","webpack://WaveSurfer/./src/util/frame.js","webpack://WaveSurfer/./src/util/get-id.js","webpack://WaveSurfer/./src/util/index.js","webpack://WaveSurfer/./src/util/max.js","webpack://WaveSurfer/./src/util/min.js","webpack://WaveSurfer/./src/util/observer.js","webpack://WaveSurfer/./src/util/orientation.js","webpack://WaveSurfer/./src/util/prevent-click.js","webpack://WaveSurfer/./src/util/request-animation-frame.js","webpack://WaveSurfer/./src/util/silence-mode.js","webpack://WaveSurfer/./src/util/style.js","webpack://WaveSurfer/./src/wavesurfer.js","webpack://WaveSurfer/./src/webaudio.js","webpack://WaveSurfer/./node_modules/debounce/index.js","webpack://WaveSurfer/webpack/bootstrap","webpack://WaveSurfer/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"WaveSurfer\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"WaveSurfer\"] = factory();\n\telse\n\t\troot[\"WaveSurfer\"] = factory();\n})(self, () => {\nreturn ","/**\n * @since 3.0.0\n */\n\nimport style from './util/style';\nimport getId from './util/get-id';\n\n/**\n * The `CanvasEntry` class represents an element consisting of a wave `canvas`\n * and an (optional) progress wave `canvas`.\n *\n * The `MultiCanvas` renderer uses one or more `CanvasEntry` instances to\n * render a waveform, depending on the zoom level.\n */\nexport default class CanvasEntry {\n constructor() {\n /**\n * The wave node\n *\n * @type {HTMLCanvasElement}\n */\n this.wave = null;\n /**\n * The wave canvas rendering context\n *\n * @type {CanvasRenderingContext2D}\n */\n this.waveCtx = null;\n /**\n * The (optional) progress wave node\n *\n * @type {HTMLCanvasElement}\n */\n this.progress = null;\n /**\n * The (optional) progress wave canvas rendering context\n *\n * @type {CanvasRenderingContext2D}\n */\n this.progressCtx = null;\n /**\n * Start of the area the canvas should render, between 0 and 1\n *\n * @type {number}\n */\n this.start = 0;\n /**\n * End of the area the canvas should render, between 0 and 1\n *\n * @type {number}\n */\n this.end = 1;\n /**\n * Unique identifier for this entry\n *\n * @type {string}\n */\n this.id = getId(\n typeof this.constructor.name !== 'undefined'\n ? this.constructor.name.toLowerCase() + '_'\n : 'canvasentry_'\n );\n /**\n * Canvas 2d context attributes\n *\n * @type {object}\n */\n this.canvasContextAttributes = {};\n }\n\n /**\n * Store the wave canvas element and create the 2D rendering context\n *\n * @param {HTMLCanvasElement} element The wave `canvas` element.\n */\n initWave(element) {\n this.wave = element;\n this.waveCtx = this.wave.getContext('2d', this.canvasContextAttributes);\n }\n\n /**\n * Store the progress wave canvas element and create the 2D rendering\n * context\n *\n * @param {HTMLCanvasElement} element The progress wave `canvas` element.\n */\n initProgress(element) {\n this.progress = element;\n this.progressCtx = this.progress.getContext(\n '2d',\n this.canvasContextAttributes\n );\n }\n\n /**\n * Update the dimensions\n *\n * @param {number} elementWidth Width of the entry\n * @param {number} totalWidth Total width of the multi canvas renderer\n * @param {number} width The new width of the element\n * @param {number} height The new height of the element\n */\n updateDimensions(elementWidth, totalWidth, width, height) {\n // where the canvas starts and ends in the waveform, represented as a\n // decimal between 0 and 1\n this.start = this.wave.offsetLeft / totalWidth || 0;\n this.end = this.start + elementWidth / totalWidth;\n\n // set wave canvas dimensions\n this.wave.width = width;\n this.wave.height = height;\n let elementSize = { width: elementWidth + 'px' };\n style(this.wave, elementSize);\n\n if (this.hasProgressCanvas) {\n // set progress canvas dimensions\n this.progress.width = width;\n this.progress.height = height;\n style(this.progress, elementSize);\n }\n }\n\n /**\n * Clear the wave and progress rendering contexts\n */\n clearWave() {\n // wave\n this.waveCtx.clearRect(\n 0,\n 0,\n this.waveCtx.canvas.width,\n this.waveCtx.canvas.height\n );\n\n // progress\n if (this.hasProgressCanvas) {\n this.progressCtx.clearRect(\n 0,\n 0,\n this.progressCtx.canvas.width,\n this.progressCtx.canvas.height\n );\n }\n }\n\n /**\n * Set the fill styles for wave and progress\n * @param {string|string[]} waveColor Fill color for the wave canvas,\n * or an array of colors to apply as a gradient\n * @param {?string|string[]} progressColor Fill color for the progress canvas,\n * or an array of colors to apply as a gradient\n */\n setFillStyles(waveColor, progressColor) {\n this.waveCtx.fillStyle = this.getFillStyle(this.waveCtx, waveColor);\n\n if (this.hasProgressCanvas) {\n this.progressCtx.fillStyle = this.getFillStyle(this.progressCtx, progressColor);\n }\n }\n\n /**\n * Utility function to handle wave color arguments\n *\n * When the color argument type is a string or CanvasGradient instance,\n * it will be returned as is. Otherwise, it will be treated as an array,\n * and a new CanvasGradient will be returned\n *\n * @since 6.0.0\n * @param {CanvasRenderingContext2D} ctx Rendering context of target canvas\n * @param {string|string[]|CanvasGradient} color Either a single fill color\n * for the wave canvas, an existing CanvasGradient instance, or an array\n * of colors to apply as a gradient\n * @returns {string|CanvasGradient} Returns a string fillstyle value, or a\n * canvas gradient\n */\n getFillStyle(ctx, color) {\n if (typeof color == 'string' || color instanceof CanvasGradient) {\n return color;\n }\n\n const waveGradient = ctx.createLinearGradient(0, 0, 0, ctx.canvas.height);\n color.forEach((value, index) => waveGradient.addColorStop((index / color.length), value));\n\n return waveGradient;\n }\n\n /**\n * Set the canvas transforms for wave and progress\n *\n * @param {boolean} vertical Whether to render vertically\n */\n applyCanvasTransforms(vertical) {\n if (vertical) {\n // Reflect the waveform across the line y = -x\n this.waveCtx.setTransform(0, 1, 1, 0, 0, 0);\n\n if (this.hasProgressCanvas) {\n this.progressCtx.setTransform(0, 1, 1, 0, 0, 0);\n }\n }\n }\n\n /**\n * Draw a rectangle for wave and progress\n *\n * @param {number} x X start position\n * @param {number} y Y start position\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n */\n fillRects(x, y, width, height, radius) {\n this.fillRectToContext(this.waveCtx, x, y, width, height, radius);\n\n if (this.hasProgressCanvas) {\n this.fillRectToContext(\n this.progressCtx,\n x,\n y,\n width,\n height,\n radius\n );\n }\n }\n\n /**\n * Draw the actual rectangle on a `canvas` element\n *\n * @param {CanvasRenderingContext2D} ctx Rendering context of target canvas\n * @param {number} x X start position\n * @param {number} y Y start position\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n */\n fillRectToContext(ctx, x, y, width, height, radius) {\n if (!ctx) {\n return;\n }\n\n if (radius) {\n this.drawRoundedRect(ctx, x, y, width, height, radius);\n } else {\n ctx.fillRect(x, y, width, height);\n }\n }\n\n /**\n * Draw a rounded rectangle on Canvas\n *\n * @param {CanvasRenderingContext2D} ctx Canvas context\n * @param {number} x X-position of the rectangle\n * @param {number} y Y-position of the rectangle\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n *\n * @return {void}\n * @example drawRoundedRect(ctx, 50, 50, 5, 10, 3)\n */\n drawRoundedRect(ctx, x, y, width, height, radius) {\n if (height === 0) {\n return;\n }\n // peaks are float values from -1 to 1. Use absolute height values in\n // order to correctly calculate rounded rectangle coordinates\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n ctx.beginPath();\n ctx.moveTo(x + radius, y);\n ctx.lineTo(x + width - radius, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n ctx.lineTo(x + width, y + height - radius);\n ctx.quadraticCurveTo(\n x + width,\n y + height,\n x + width - radius,\n y + height\n );\n ctx.lineTo(x + radius, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n ctx.lineTo(x, y + radius);\n ctx.quadraticCurveTo(x, y, x + radius, y);\n ctx.closePath();\n ctx.fill();\n }\n\n /**\n * Render the actual wave and progress lines\n *\n * @param {number[]} peaks Array with peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n */\n drawLines(peaks, absmax, halfH, offsetY, start, end) {\n this.drawLineToContext(\n this.waveCtx,\n peaks,\n absmax,\n halfH,\n offsetY,\n start,\n end\n );\n\n if (this.hasProgressCanvas) {\n this.drawLineToContext(\n this.progressCtx,\n peaks,\n absmax,\n halfH,\n offsetY,\n start,\n end\n );\n }\n }\n\n /**\n * Render the actual waveform line on a `canvas` element\n *\n * @param {CanvasRenderingContext2D} ctx Rendering context of target canvas\n * @param {number[]} peaks Array with peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n */\n drawLineToContext(ctx, peaks, absmax, halfH, offsetY, start, end) {\n if (!ctx) {\n return;\n }\n\n const length = peaks.length / 2;\n const first = Math.round(length * this.start);\n\n // use one more peak value to make sure we join peaks at ends -- unless,\n // of course, this is the last canvas\n const last = Math.round(length * this.end) + 1;\n\n const canvasStart = first;\n const canvasEnd = last;\n const scale = this.wave.width / (canvasEnd - canvasStart - 1);\n\n // optimization\n const halfOffset = halfH + offsetY;\n const absmaxHalf = absmax / halfH;\n\n ctx.beginPath();\n ctx.moveTo((canvasStart - first) * scale, halfOffset);\n\n ctx.lineTo(\n (canvasStart - first) * scale,\n halfOffset - Math.round((peaks[2 * canvasStart] || 0) / absmaxHalf)\n );\n\n let i, peak, h;\n for (i = canvasStart; i < canvasEnd; i++) {\n peak = peaks[2 * i] || 0;\n h = Math.round(peak / absmaxHalf);\n ctx.lineTo((i - first) * scale + this.halfPixel, halfOffset - h);\n }\n\n // draw the bottom edge going backwards, to make a single\n // closed hull to fill\n let j = canvasEnd - 1;\n for (j; j >= canvasStart; j--) {\n peak = peaks[2 * j + 1] || 0;\n h = Math.round(peak / absmaxHalf);\n ctx.lineTo((j - first) * scale + this.halfPixel, halfOffset - h);\n }\n\n ctx.lineTo(\n (canvasStart - first) * scale,\n halfOffset -\n Math.round((peaks[2 * canvasStart + 1] || 0) / absmaxHalf)\n );\n\n ctx.closePath();\n ctx.fill();\n }\n\n /**\n * Destroys this entry\n */\n destroy() {\n this.waveCtx = null;\n this.wave = null;\n\n this.progressCtx = null;\n this.progress = null;\n }\n\n /**\n * Return image data of the wave `canvas` element\n *\n * When using a `type` of `'blob'`, this will return a `Promise` that\n * resolves with a `Blob` instance.\n *\n * @param {string} format='image/png' An optional value of a format type.\n * @param {number} quality=0.92 An optional value between 0 and 1.\n * @param {string} type='dataURL' Either 'dataURL' or 'blob'.\n * @return {string|Promise} When using the default `'dataURL'` `type` this\n * returns a data URL. When using the `'blob'` `type` this returns a\n * `Promise` that resolves with a `Blob` instance.\n */\n getImage(format, quality, type) {\n if (type === 'blob') {\n return new Promise(resolve => {\n this.wave.toBlob(resolve, format, quality);\n });\n } else if (type === 'dataURL') {\n return this.wave.toDataURL(format, quality);\n }\n }\n}\n","import * as util from './util';\n\n/**\n * Parent class for renderers\n *\n * @extends {Observer}\n */\nexport default class Drawer extends util.Observer {\n /**\n * @param {HTMLElement} container The container node of the wavesurfer instance\n * @param {WavesurferParams} params The wavesurfer initialisation options\n */\n constructor(container, params) {\n super();\n\n this.container = util.withOrientation(container, params.vertical);\n /**\n * @type {WavesurferParams}\n */\n this.params = params;\n /**\n * The width of the renderer\n * @type {number}\n */\n this.width = 0;\n /**\n * The height of the renderer\n * @type {number}\n */\n this.height = params.height * this.params.pixelRatio;\n\n this.lastPos = 0;\n /**\n * The `` element which is added to the container\n * @type {HTMLElement}\n */\n this.wrapper = null;\n }\n\n /**\n * Alias of `util.style`\n *\n * @param {HTMLElement} el The element that the styles will be applied to\n * @param {Object} styles The map of propName: attribute, both are used as-is\n * @return {HTMLElement} el\n */\n style(el, styles) {\n return util.style(el, styles);\n }\n\n /**\n * Create the wrapper `` element, style it and set up the events for\n * interaction\n */\n createWrapper() {\n this.wrapper = util.withOrientation(\n this.container.appendChild(document.createElement('wave')),\n this.params.vertical\n );\n\n this.style(this.wrapper, {\n display: 'block',\n position: 'relative',\n userSelect: 'none',\n webkitUserSelect: 'none',\n height: this.params.height + 'px'\n });\n\n if (this.params.fillParent || this.params.scrollParent) {\n this.style(this.wrapper, {\n width: '100%',\n cursor: this.params.hideCursor ? 'none' : 'auto',\n overflowX: this.params.hideScrollbar ? 'hidden' : 'auto',\n overflowY: 'hidden'\n });\n }\n\n this.setupWrapperEvents();\n }\n\n /**\n * Handle click event\n *\n * @param {Event} e Click event\n * @param {?boolean} noPrevent Set to true to not call `e.preventDefault()`\n * @return {number} Playback position from 0 to 1\n */\n handleEvent(e, noPrevent) {\n !noPrevent && e.preventDefault();\n\n const clientX = util.withOrientation(\n e.targetTouches ? e.targetTouches[0] : e,\n this.params.vertical\n ).clientX;\n const bbox = this.wrapper.getBoundingClientRect();\n\n const nominalWidth = this.width;\n const parentWidth = this.getWidth();\n const progressPixels = this.getProgressPixels(bbox, clientX);\n\n let progress;\n if (!this.params.fillParent && nominalWidth < parentWidth) {\n progress = progressPixels *\n (this.params.pixelRatio / nominalWidth) || 0;\n } else {\n progress = (progressPixels + this.wrapper.scrollLeft) /\n this.wrapper.scrollWidth || 0;\n }\n\n return util.clamp(progress, 0, 1);\n }\n\n getProgressPixels(wrapperBbox, clientX) {\n if (this.params.rtl) {\n return wrapperBbox.right - clientX;\n } else {\n return clientX - wrapperBbox.left;\n }\n }\n\n setupWrapperEvents() {\n this.wrapper.addEventListener('click', e => {\n const orientedEvent = util.withOrientation(e, this.params.vertical);\n const scrollbarHeight = this.wrapper.offsetHeight -\n this.wrapper.clientHeight;\n\n if (scrollbarHeight !== 0) {\n // scrollbar is visible. Check if click was on it\n const bbox = this.wrapper.getBoundingClientRect();\n if (orientedEvent.clientY >= bbox.bottom - scrollbarHeight) {\n // ignore mousedown as it was on the scrollbar\n return;\n }\n }\n\n if (this.params.interact) {\n this.fireEvent('click', e, this.handleEvent(e));\n }\n });\n\n this.wrapper.addEventListener('dblclick', e => {\n if (this.params.interact) {\n this.fireEvent('dblclick', e, this.handleEvent(e));\n }\n });\n\n this.wrapper.addEventListener('scroll', e =>\n this.fireEvent('scroll', e)\n );\n }\n\n /**\n * Draw peaks on the canvas\n *\n * @param {number[]|Number.} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} length The width of the area that should be drawn\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n drawPeaks(peaks, length, start, end) {\n if (!this.setWidth(length)) {\n this.clearWave();\n }\n\n this.params.barWidth\n ? this.drawBars(peaks, 0, start, end)\n : this.drawWave(peaks, 0, start, end);\n }\n\n /**\n * Scroll to the beginning\n */\n resetScroll() {\n if (this.wrapper !== null) {\n this.wrapper.scrollLeft = 0;\n }\n }\n\n /**\n * Recenter the view-port at a certain percent of the waveform\n *\n * @param {number} percent Value from 0 to 1 on the waveform\n */\n recenter(percent) {\n const position = this.wrapper.scrollWidth * percent;\n this.recenterOnPosition(position, true);\n }\n\n /**\n * Recenter the view-port on a position, either scroll there immediately or\n * in steps of 5 pixels\n *\n * @param {number} position X-offset in pixels\n * @param {boolean} immediate Set to true to immediately scroll somewhere\n */\n recenterOnPosition(position, immediate) {\n const scrollLeft = this.wrapper.scrollLeft;\n const half = ~~(this.wrapper.clientWidth / 2);\n const maxScroll = this.wrapper.scrollWidth - this.wrapper.clientWidth;\n let target = position - half;\n let offset = target - scrollLeft;\n\n if (maxScroll == 0) {\n // no need to continue if scrollbar is not there\n return;\n }\n\n // if the cursor is currently visible...\n if (!immediate && -half <= offset && offset < half) {\n // set rate at which waveform is centered\n let rate = this.params.autoCenterRate;\n\n // make rate depend on width of view and length of waveform\n rate /= half;\n rate *= maxScroll;\n\n offset = Math.max(-rate, Math.min(rate, offset));\n target = scrollLeft + offset;\n }\n\n // limit target to valid range (0 to maxScroll)\n target = Math.max(0, Math.min(maxScroll, target));\n // no use attempting to scroll if we're not moving\n if (target != scrollLeft) {\n this.wrapper.scrollLeft = target;\n }\n }\n\n /**\n * Get the current scroll position in pixels\n *\n * @return {number} Horizontal scroll position in pixels\n */\n getScrollX() {\n let x = 0;\n if (this.wrapper) {\n const pixelRatio = this.params.pixelRatio;\n x = Math.round(this.wrapper.scrollLeft * pixelRatio);\n\n // In cases of elastic scroll (safari with mouse wheel) you can\n // scroll beyond the limits of the container\n // Calculate and floor the scrollable extent to make sure an out\n // of bounds value is not returned\n // Ticket #1312\n if (this.params.scrollParent) {\n const maxScroll = ~~(\n this.wrapper.scrollWidth * pixelRatio -\n this.getWidth()\n );\n x = Math.min(maxScroll, Math.max(0, x));\n }\n }\n return x;\n }\n\n /**\n * Get the width of the container\n *\n * @return {number} The width of the container\n */\n getWidth() {\n return Math.round(this.container.clientWidth * this.params.pixelRatio);\n }\n\n /**\n * Set the width of the container\n *\n * @param {number} width The new width of the container\n * @return {boolean} Whether the width of the container was updated or not\n */\n setWidth(width) {\n if (this.width == width) {\n return false;\n }\n\n this.width = width;\n\n if (this.params.fillParent || this.params.scrollParent) {\n this.style(this.wrapper, {\n width: ''\n });\n } else {\n const newWidth = ~~(this.width / this.params.pixelRatio) + 'px';\n this.style(this.wrapper, {\n width: newWidth\n });\n }\n\n this.updateSize();\n return true;\n }\n\n /**\n * Set the height of the container\n *\n * @param {number} height The new height of the container.\n * @return {boolean} Whether the height of the container was updated or not\n */\n setHeight(height) {\n if (height == this.height) {\n return false;\n }\n this.height = height;\n\n this.style(this.wrapper, {\n height: ~~(this.height / this.params.pixelRatio) + 'px'\n });\n\n this.updateSize();\n return true;\n }\n\n /**\n * Called by wavesurfer when progress should be rendered\n *\n * @param {number} progress From 0 to 1\n */\n progress(progress) {\n const minPxDelta = 1 / this.params.pixelRatio;\n const pos = Math.round(progress * this.width) * minPxDelta;\n\n if (pos < this.lastPos || pos - this.lastPos >= minPxDelta) {\n this.lastPos = pos;\n\n if (this.params.scrollParent && this.params.autoCenter) {\n const newPos = ~~(this.wrapper.scrollWidth * progress);\n this.recenterOnPosition(\n newPos,\n this.params.autoCenterImmediately\n );\n }\n\n this.updateProgress(pos);\n }\n }\n\n /**\n * This is called when wavesurfer is destroyed\n */\n destroy() {\n this.unAll();\n if (this.wrapper) {\n if (this.wrapper.parentNode == this.container.domElement) {\n this.container.removeChild(this.wrapper.domElement);\n }\n this.wrapper = null;\n }\n }\n\n /* Renderer-specific methods */\n\n /**\n * Called after cursor related params have changed.\n *\n * @abstract\n */\n updateCursor() {}\n\n /**\n * Called when the size of the container changes so the renderer can adjust\n *\n * @abstract\n */\n updateSize() {}\n\n /**\n * Draw a waveform with bars\n *\n * @abstract\n * @param {number[]|Number.} peaks Can also be an array of arrays for split channel\n * rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n drawBars(peaks, channelIndex, start, end) {}\n\n /**\n * Draw a waveform\n *\n * @abstract\n * @param {number[]|Number.} peaks Can also be an array of arrays for split channel\n * rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n */\n drawWave(peaks, channelIndex, start, end) {}\n\n /**\n * Clear the waveform\n *\n * @abstract\n */\n clearWave() {}\n\n /**\n * Render the new progress\n *\n * @abstract\n * @param {number} position X-Offset of progress position in pixels\n */\n updateProgress(position) {}\n}\n","import Drawer from './drawer';\nimport * as util from './util';\nimport CanvasEntry from './drawer.canvasentry';\n\n/**\n * MultiCanvas renderer for wavesurfer. Is currently the default and sole\n * builtin renderer.\n *\n * A `MultiCanvas` consists of one or more `CanvasEntry` instances, depending\n * on the zoom level.\n */\nexport default class MultiCanvas extends Drawer {\n /**\n * @param {HTMLElement} container The container node of the wavesurfer instance\n * @param {WavesurferParams} params The wavesurfer initialisation options\n */\n constructor(container, params) {\n super(container, params);\n\n /**\n * @type {number}\n */\n this.maxCanvasWidth = params.maxCanvasWidth;\n\n /**\n * @type {number}\n */\n this.maxCanvasElementWidth = Math.round(\n params.maxCanvasWidth / params.pixelRatio\n );\n\n /**\n * Whether or not the progress wave is rendered. If the `waveColor`\n * and `progressColor` are the same color it is not.\n *\n * @type {boolean}\n */\n this.hasProgressCanvas = params.waveColor != params.progressColor;\n\n /**\n * @type {number}\n */\n this.halfPixel = 0.5 / params.pixelRatio;\n\n /**\n * List of `CanvasEntry` instances.\n *\n * @type {Array}\n */\n this.canvases = [];\n\n /**\n * @type {HTMLElement}\n */\n this.progressWave = null;\n\n /**\n * Class used to generate entries.\n *\n * @type {function}\n */\n this.EntryClass = CanvasEntry;\n\n /**\n * Canvas 2d context attributes.\n *\n * @type {object}\n */\n this.canvasContextAttributes = params.drawingContextAttributes;\n\n /**\n * Overlap added between entries to prevent vertical white stripes\n * between `canvas` elements.\n *\n * @type {number}\n */\n this.overlap = 2 * Math.ceil(params.pixelRatio / 2);\n\n /**\n * The radius of the wave bars. Makes bars rounded\n *\n * @type {number}\n */\n this.barRadius = params.barRadius || 0;\n\n /**\n * Whether to render the waveform vertically. Defaults to false.\n *\n * @type {boolean}\n */\n this.vertical = params.vertical;\n }\n\n /**\n * Initialize the drawer\n */\n init() {\n this.createWrapper();\n this.createElements();\n }\n\n /**\n * Create the canvas elements and style them\n *\n */\n createElements() {\n this.progressWave = util.withOrientation(\n this.wrapper.appendChild(document.createElement('wave')),\n this.params.vertical\n );\n this.style(this.progressWave, {\n position: 'absolute',\n zIndex: 3,\n left: 0,\n top: 0,\n bottom: 0,\n overflow: 'hidden',\n width: '0',\n display: 'none',\n boxSizing: 'border-box',\n borderRightStyle: 'solid',\n pointerEvents: 'none'\n });\n\n this.addCanvas();\n this.updateCursor();\n }\n\n /**\n * Update cursor style\n */\n updateCursor() {\n this.style(this.progressWave, {\n borderRightWidth: this.params.cursorWidth + 'px',\n borderRightColor: this.params.cursorColor\n });\n }\n\n /**\n * Adjust to the updated size by adding or removing canvases\n */\n updateSize() {\n const totalWidth = Math.round(this.width / this.params.pixelRatio);\n const requiredCanvases = Math.ceil(\n totalWidth / (this.maxCanvasElementWidth + this.overlap)\n );\n\n // add required canvases\n while (this.canvases.length < requiredCanvases) {\n this.addCanvas();\n }\n\n // remove older existing canvases, if any\n while (this.canvases.length > requiredCanvases) {\n this.removeCanvas();\n }\n\n let canvasWidth = this.maxCanvasWidth + this.overlap;\n const lastCanvas = this.canvases.length - 1;\n this.canvases.forEach((entry, i) => {\n if (i == lastCanvas) {\n canvasWidth = this.width - this.maxCanvasWidth * lastCanvas;\n }\n this.updateDimensions(entry, canvasWidth, this.height);\n\n entry.clearWave();\n });\n }\n\n /**\n * Add a canvas to the canvas list\n *\n */\n addCanvas() {\n const entry = new this.EntryClass();\n entry.canvasContextAttributes = this.canvasContextAttributes;\n entry.hasProgressCanvas = this.hasProgressCanvas;\n entry.halfPixel = this.halfPixel;\n const leftOffset = this.maxCanvasElementWidth * this.canvases.length;\n\n // wave\n let wave = util.withOrientation(\n this.wrapper.appendChild(document.createElement('canvas')),\n this.params.vertical\n );\n this.style(wave, {\n position: 'absolute',\n zIndex: 2,\n left: leftOffset + 'px',\n top: 0,\n bottom: 0,\n height: '100%',\n pointerEvents: 'none'\n });\n entry.initWave(wave);\n\n // progress\n if (this.hasProgressCanvas) {\n let progress = util.withOrientation(\n this.progressWave.appendChild(document.createElement('canvas')),\n this.params.vertical\n );\n this.style(progress, {\n position: 'absolute',\n left: leftOffset + 'px',\n top: 0,\n bottom: 0,\n height: '100%'\n });\n entry.initProgress(progress);\n }\n\n this.canvases.push(entry);\n }\n\n /**\n * Pop single canvas from the list\n *\n */\n removeCanvas() {\n let lastEntry = this.canvases[this.canvases.length - 1];\n\n // wave\n lastEntry.wave.parentElement.removeChild(lastEntry.wave.domElement);\n\n // progress\n if (this.hasProgressCanvas) {\n lastEntry.progress.parentElement.removeChild(lastEntry.progress.domElement);\n }\n\n // cleanup\n if (lastEntry) {\n lastEntry.destroy();\n lastEntry = null;\n }\n\n this.canvases.pop();\n }\n\n /**\n * Update the dimensions of a canvas element\n *\n * @param {CanvasEntry} entry Target entry\n * @param {number} width The new width of the element\n * @param {number} height The new height of the element\n */\n updateDimensions(entry, width, height) {\n const elementWidth = Math.round(width / this.params.pixelRatio);\n const totalWidth = Math.round(this.width / this.params.pixelRatio);\n\n // update canvas dimensions\n entry.updateDimensions(elementWidth, totalWidth, width, height);\n\n // style element\n this.style(this.progressWave, { display: 'block' });\n }\n\n /**\n * Clear the whole multi-canvas\n */\n clearWave() {\n util.frame(() => {\n this.canvases.forEach(entry => entry.clearWave());\n })();\n }\n\n /**\n * Draw a waveform with bars\n *\n * @param {number[]|Number.} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0. Must be an integer.\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that should be\n * rendered\n * @returns {void}\n */\n drawBars(peaks, channelIndex, start, end) {\n return this.prepareDraw(\n peaks,\n channelIndex,\n start,\n end,\n ({ absmax, hasMinVals, height, offsetY, halfH, peaks, channelIndex: ch }) => {\n // if drawBars was called within ws.empty we don't pass a start and\n // don't want anything to happen\n if (start === undefined) {\n return;\n }\n // Skip every other value if there are negatives.\n const peakIndexScale = hasMinVals ? 2 : 1;\n const length = peaks.length / peakIndexScale;\n const bar = this.params.barWidth * this.params.pixelRatio;\n const gap =\n this.params.barGap === null\n ? Math.max(this.params.pixelRatio, ~~(bar / 2))\n : Math.max(\n this.params.pixelRatio,\n this.params.barGap * this.params.pixelRatio\n );\n const step = bar + gap;\n\n const scale = length / this.width;\n const first = start;\n const last = end;\n let peakIndex = first;\n for (peakIndex; peakIndex < last; peakIndex += step) {\n\n // search for the highest peak in the range this bar falls into\n let peak = 0;\n let peakIndexRange = Math.floor(peakIndex * scale) * peakIndexScale; // start index\n const peakIndexEnd = Math.floor((peakIndex + step) * scale) * peakIndexScale;\n do { // do..while makes sure at least one peak is always evaluated\n const newPeak = Math.abs(peaks[peakIndexRange]); // for arrays starting with negative values\n if (newPeak > peak) {\n peak = newPeak; // higher\n }\n peakIndexRange += peakIndexScale; // skip every other value for negatives\n } while (peakIndexRange < peakIndexEnd);\n\n // calculate the height of this bar according to the highest peak found\n let h = Math.round((peak / absmax) * halfH);\n\n // raise the bar height to the specified minimum height\n // Math.max is used to replace any value smaller than barMinHeight (not just 0) with barMinHeight\n if (this.params.barMinHeight) {\n h = Math.max(h, this.params.barMinHeight);\n }\n\n this.fillRect(\n peakIndex + this.halfPixel,\n halfH - h + offsetY,\n bar + this.halfPixel,\n h * 2,\n this.barRadius,\n ch\n );\n }\n }\n );\n }\n\n /**\n * Draw a waveform\n *\n * @param {number[]|Number.} peaks Can also be an array of arrays\n * for split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number?} start The x-offset of the beginning of the area that\n * should be rendered (If this isn't set only a flat line is rendered)\n * @param {number?} end The x-offset of the end of the area that should be\n * rendered\n * @returns {void}\n */\n drawWave(peaks, channelIndex, start, end) {\n return this.prepareDraw(\n peaks,\n channelIndex,\n start,\n end,\n ({ absmax, hasMinVals, height, offsetY, halfH, peaks, channelIndex }) => {\n if (!hasMinVals) {\n const reflectedPeaks = [];\n const len = peaks.length;\n let i = 0;\n for (i; i < len; i++) {\n reflectedPeaks[2 * i] = peaks[i];\n reflectedPeaks[2 * i + 1] = -peaks[i];\n }\n peaks = reflectedPeaks;\n }\n\n // if drawWave was called within ws.empty we don't pass a start and\n // end and simply want a flat line\n if (start !== undefined) {\n this.drawLine(peaks, absmax, halfH, offsetY, start, end, channelIndex);\n }\n\n // always draw a median line\n this.fillRect(\n 0,\n halfH + offsetY - this.halfPixel,\n this.width,\n this.halfPixel,\n this.barRadius,\n channelIndex\n );\n }\n );\n }\n\n /**\n * Tell the canvas entries to render their portion of the waveform\n *\n * @param {number[]} peaks Peaks data\n * @param {number} absmax Maximum peak value (absolute)\n * @param {number} halfH Half the height of the waveform\n * @param {number} offsetY Offset to the top\n * @param {number} start The x-offset of the beginning of the area that\n * should be rendered\n * @param {number} end The x-offset of the end of the area that\n * should be rendered\n * @param {channelIndex} channelIndex The channel index of the line drawn\n */\n drawLine(peaks, absmax, halfH, offsetY, start, end, channelIndex) {\n const { waveColor, progressColor } = this.params.splitChannelsOptions.channelColors[channelIndex] || {};\n this.canvases.forEach((entry, i) => {\n this.setFillStyles(entry, waveColor, progressColor);\n this.applyCanvasTransforms(entry, this.params.vertical);\n entry.drawLines(peaks, absmax, halfH, offsetY, start, end);\n });\n }\n\n /**\n * Draw a rectangle on the multi-canvas\n *\n * @param {number} x X-position of the rectangle\n * @param {number} y Y-position of the rectangle\n * @param {number} width Width of the rectangle\n * @param {number} height Height of the rectangle\n * @param {number} radius Radius of the rectangle\n * @param {channelIndex} channelIndex The channel index of the bar drawn\n */\n fillRect(x, y, width, height, radius, channelIndex) {\n const startCanvas = Math.floor(x / this.maxCanvasWidth);\n const endCanvas = Math.min(\n Math.ceil((x + width) / this.maxCanvasWidth) + 1,\n this.canvases.length\n );\n let i = startCanvas;\n for (i; i < endCanvas; i++) {\n const entry = this.canvases[i];\n const leftOffset = i * this.maxCanvasWidth;\n\n const intersection = {\n x1: Math.max(x, i * this.maxCanvasWidth),\n y1: y,\n x2: Math.min(\n x + width,\n i * this.maxCanvasWidth + entry.wave.width\n ),\n y2: y + height\n };\n\n if (intersection.x1 < intersection.x2) {\n const { waveColor, progressColor } = this.params.splitChannelsOptions.channelColors[channelIndex] || {};\n this.setFillStyles(entry, waveColor, progressColor);\n this.applyCanvasTransforms(entry, this.params.vertical);\n\n entry.fillRects(\n intersection.x1 - leftOffset,\n intersection.y1,\n intersection.x2 - intersection.x1,\n intersection.y2 - intersection.y1,\n radius\n );\n }\n }\n }\n\n /**\n * Returns whether to hide the channel from being drawn based on params.\n *\n * @param {number} channelIndex The index of the current channel.\n * @returns {bool} True to hide the channel, false to draw.\n */\n hideChannel(channelIndex) {\n return this.params.splitChannels && this.params.splitChannelsOptions.filterChannels.includes(channelIndex);\n }\n\n /**\n * Performs preparation tasks and calculations which are shared by `drawBars`\n * and `drawWave`\n *\n * @param {number[]|Number.} peaks Can also be an array of arrays for\n * split channel rendering\n * @param {number} channelIndex The index of the current channel. Normally\n * should be 0\n * @param {number?} start The x-offset of the beginning of the area that\n * should be rendered. If this isn't set only a flat line is rendered\n * @param {number?} end The x-offset of the end of the area that should be\n * rendered\n * @param {function} fn The render function to call, e.g. `drawWave`\n * @param {number} drawIndex The index of the current channel after filtering.\n * @param {number?} normalizedMax Maximum modulation value across channels for use with relativeNormalization. Ignored when undefined\n * @returns {void}\n */\n prepareDraw(peaks, channelIndex, start, end, fn, drawIndex, normalizedMax) {\n return util.frame(() => {\n // Split channels and call this function with the channelIndex set\n if (peaks[0] instanceof Array) {\n const channels = peaks;\n\n if (this.params.splitChannels) {\n const filteredChannels = channels.filter((c, i) => !this.hideChannel(i));\n if (!this.params.splitChannelsOptions.overlay) {\n this.setHeight(\n Math.max(filteredChannels.length, 1) *\n this.params.height *\n this.params.pixelRatio\n );\n }\n\n let overallAbsMax;\n if (this.params.splitChannelsOptions && this.params.splitChannelsOptions.relativeNormalization) {\n // calculate maximum peak across channels to use for normalization\n overallAbsMax = util.max(channels.map((channelPeaks => util.absMax(channelPeaks))));\n }\n\n\n return channels.forEach((channelPeaks, i) =>\n this.prepareDraw(channelPeaks, i, start, end, fn, filteredChannels.indexOf(channelPeaks), overallAbsMax)\n );\n }\n peaks = channels[0];\n }\n\n // Return and do not draw channel peaks if hidden.\n if (this.hideChannel(channelIndex)) {\n return;\n }\n\n // calculate maximum modulation value, either from the barHeight\n // parameter or if normalize=true from the largest value in the peak\n // set\n let absmax = 1 / this.params.barHeight;\n if (this.params.normalize) {\n absmax = normalizedMax === undefined ? util.absMax(peaks) : normalizedMax;\n }\n\n // Bar wave draws the bottom only as a reflection of the top,\n // so we don't need negative values\n const hasMinVals = [].some.call(peaks, val => val < 0);\n const height = this.params.height * this.params.pixelRatio;\n const halfH = height / 2;\n\n let offsetY = height * drawIndex || 0;\n\n // Override offsetY if overlay is true\n if (this.params.splitChannelsOptions && this.params.splitChannelsOptions.overlay) {\n offsetY = 0;\n }\n\n return fn({\n absmax: absmax,\n hasMinVals: hasMinVals,\n height: height,\n offsetY: offsetY,\n halfH: halfH,\n peaks: peaks,\n channelIndex: channelIndex\n });\n })();\n }\n\n /**\n * Set the fill styles for a certain entry (wave and progress)\n *\n * @param {CanvasEntry} entry Target entry\n * @param {string} waveColor Wave color to draw this entry\n * @param {string} progressColor Progress color to draw this entry\n */\n setFillStyles(entry, waveColor = this.params.waveColor, progressColor = this.params.progressColor) {\n entry.setFillStyles(waveColor, progressColor);\n }\n\n /**\n * Set the canvas transforms for a certain entry (wave and progress)\n *\n * @param {CanvasEntry} entry Target entry\n * @param {boolean} vertical Whether to render the waveform vertically\n */\n applyCanvasTransforms(entry, vertical = false) {\n entry.applyCanvasTransforms(vertical);\n }\n\n /**\n * Return image data of the multi-canvas\n *\n * When using a `type` of `'blob'`, this will return a `Promise`.\n *\n * @param {string} format='image/png' An optional value of a format type.\n * @param {number} quality=0.92 An optional value between 0 and 1.\n * @param {string} type='dataURL' Either 'dataURL' or 'blob'.\n * @return {string|string[]|Promise} When using the default `'dataURL'`\n * `type` this returns a single data URL or an array of data URLs,\n * one for each canvas. When using the `'blob'` `type` this returns a\n * `Promise` that resolves with an array of `Blob` instances, one for each\n * canvas.\n */\n getImage(format, quality, type) {\n if (type === 'blob') {\n return Promise.all(\n this.canvases.map(entry => {\n return entry.getImage(format, quality, type);\n })\n );\n } else if (type === 'dataURL') {\n let images = this.canvases.map(entry =>\n entry.getImage(format, quality, type)\n );\n return images.length > 1 ? images : images[0];\n }\n }\n\n /**\n * Render the new progress\n *\n * @param {number} position X-offset of progress position in pixels\n */\n updateProgress(position) {\n this.style(this.progressWave, { width: position + 'px' });\n }\n}\n","import MediaElement from './mediaelement';\n\n/**\n * MediaElementWebAudio backend: load audio via an HTML5 audio tag, but playback with the WebAudio API.\n * The advantage here is that the html5