Wavesurfer.js: Cannot Read Property Canvas of Undefined
-
Recently, the podcast player on my company’s website has not been working on the site for all of our archived shows. When the play button is clicked on the audio player, nothing happens; the shows will not play. While using Chrome and Firefox, if the button is clicked 3-4 times the show will start playing. But with Microsoft Edge, the show never plays.
While trying to investigate why the audio won’t play upon the first several clicks, I was using Chrome’s developer tools. When clicking the play button, the following error displays in the “Console” window:
Uncaught TypeError: Cannot read property ‘canvas’ of undefined
at Object.updateDimensions (wavesurfer.js:2064)
at Object.updateSize (wavesurfer.js:2014)
at Object.setWidth (wavesurfer.js:1686)
at Object.empty (wavesurfer.js:604)
at Object.load (wavesurfer.js:412)
at (index):422
at wavesurfer.js:795
at Array.forEach (<anonymous>)
at Object.fireEvent (wavesurfer.js:794)
at wavesurfer.js:144Every discussion of this error that I have found seems to be easily fixable by editing the HTML document of the website using Wavesurfer, by including the .js file in a certain way. However, my website does not use the Wavesurfer.js file; it is not on the server anywhere. However, Wavesurfer is being called each time the page loads from its source on Cloudflare. (<script type=’text/javascript’ src=’//cdnjs.cloudflare.com/ajax/libs/wavesurfer.js/1.4.0/wavesurfer.min.js?ver%5B0%5D=jquery’></script>)
Does the default audio player for WordPress use the Wavesurfer framework? If so, how do I fix the above error if I can neither edit the dynamically created page HTML or edit the Wavesurfer.js file since it is not on our server?
The page I need help with: [log in to see the link]
The topic ‘Wavesurfer.js: Cannot Read Property Canvas of Undefined’ is closed to new replies.