I tried to adopt this audio visualizer from https://github.com/wayou/audio-visualizer-with-controls onto codepen.io. These are the problems I encountered.
1- The visualizer (bar graph type display) is not working on the canvas field. 2 -There is no sound even though the audio player is playing.
Here is the link to my file in codepen http://codepen.io/cgyc8866/pen/wGRqLw
Here is the HTML file. The CSS and JS file can be viewed in codepen at the above link.
<html>
<head>
<title>audio visualizer with audio element</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h3>audio visualizer with controls</h3>
<p>star me on <a href="https://github.com/wayou/audio-visualizer-with-controls">github</a> </p>
<canvas id='canvas' width="800" height="350"></canvas>
<br>
<br>
<audio src="http://wayou.github.io/audio-visualizer-with-controls/assets/sample.mp3" id="audio" controls>audio element not supported</audio>
<script src="main.js"></script>
</body>
I hope someone can take a look. I like to get this program working in codepen or at least to know why it is not working. Thank you in advance.