Ember.js Uncaught TypeError: Cannot set property 'fillStyle' of undefined
See original GitHub issueHey, so I’m trying to use WaveSurfer within my Ember.js project with no prevail(I doubt Ember is causing these issues).
I imported the latest version of wavesurfer.js through Bower, and then used this exact code in one of my templates:
<div id="waveform"></div>
<script>
var wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: 'red',
progressColor: 'purple'
});
wavesurfer.load('assets/sound4.mp3');
</script>
Now when I try to see if it works, my console errors saying Uncaught TypeError: Cannot set property 'fillStyle' of undefined
.
Here’s what line in wavesurfer.js it’s erroring at:
setFillStyles: function (entry) {
entry.waveCtx.fillStyle = this.params.waveColor; <--- HERE
if (this.hasProgressCanvas) {
entry.progressCtx.fillStyle = this.params.progressColor;
}
},
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Jest import statement: 'TypeError: Cannot set property ' ...
The error occurs because jestdom is not able add canvas, which we need to do. For me this happened because I was using...
Read more >TypeError: Cannot set property 'fillStyle' of null - Techy Things
TypeError : Cannot set property 'fillStyle' of null. Solution. https://www.npmjs.com/package/jest-canvas-mock. $ yarn add --dev jest-canvas- ...
Read more >Set property on controller from within a component
I'm assuming this means that the property is being set in that view and not on the controller. I've tried setting it by...
Read more >Computed property names cannot be received if set by a ...
[Solved]-Computed property names cannot be received if set by a numeric variable-babel.js. Search. score:3. This is a bug in the experimental babel plugin....
Read more >UDN Search
the javascript exception "can't define property "x": "obj" is not extensible" occurs when object.preventextensions() marked an object as no longer extensible, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, I just tried out the 2.0 beta and it’s working great! Good work!
Thank you. This was exactly the problem!